Okay
  Public Ticket #553063
How to remove default link from an image
Closed

Comments

  • Anandan started the conversation

    Hi,

    Can you plz tell me how to remove the default link from the image on the site.

    I know the method of setting the link to "none" when adding an image but I have got many images on the site and manually changing them one by one is very hard.

    The "No Image link" plugin did not work.

    I also added this code but the link still shows.

    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);

  •  93
    djwd replied

    Hi there,

    sorry I\'m not quite sure I understand the issue correctly, do you mean images on the post content linking to the full image?

    If that\'s it I believe you\'d need a function directly in your functions.php to make the options \'none\' to be the default setting, at first glance the code you posted looks correct to me.

    Understanding why is not working would need some further investigations which unfortunately go beyond regular support, as this not actually theme related...! I suggest seeking for an alternative or address the issue to a developer.

    Regards
    djwd