Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Disabling links to the media file in postings

Discussion in 'Misc WordPress Requests' started by steveja7, Oct 17, 2017.

  1. steveja7

    Guest

    Reply To: Disabling links to the media file in postings, by steveja7

    Sorry. I agree, I might not have been clear.

    I am using the Visual tab. By selecting the editing tool within the post, I mean that after the image is inserted and you click on the image, you get a selection of icons. By clicking on the pencil icon, you get a popup window where you can edit the settings for that image. It looks similar to the same window you get when you select the image for inserting. When I select that pencil icon, the Link To shows the custom link.

    When I switch to the Text tab, I can see that the WordPress post editor inserts a link to the media file. There should be no link.

    As for the code, I did a cut and paste from the article you quote. It is the same code. That said, here is the code:
    `function wpb_imagelink_setup() {
    $image_set = get_option( ‘image_default_link_type’ );

    if ($image_set !== ‘none’) {
    update_option(‘image_default_link_type’, ‘none’);
    }
    }
    add_action(‘admin_init’, ‘wpb_imagelink_setup’, 10);

    Reply To: Disabling links to the media file in postings
     
    #1

Share This Page

Web Hosting