Remove links from Featured Image and Images
-
Where do I find the bad guy ?
I want to remove links from featured images I use in a restaurant menu and from regular images on pages which I inserted from the media library.
I call the following ‘The Above’: In both cases when clicking on the image the page darkens and a bigger version or thumbnail of the image opens. Left and right arrows let me advance or go to the previous image on the page. In the top right is a close box. Clicking it returns the page to normal.
When I add regular images to a page I select ‘None’ in the ‘Link To’ box but something overwrites it later because it still links to ‘The Above’.
If I set a custom link and then hover over the image I see the correct URL where the image should link – but again, when clicking on it, I get ‘The Above’. But, when I right-click on it, and select ‘Open Link in new Tab’, it does open the correct page.
After searching for hours on Google I added the following to the functions.php and again no change:
if ( has_post_thumbnail() ) { return "<div class='post-thumbnail'>" . $featured_image . "</div>"; }
And
`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);`Can someone direct me:
Where to I have to look for what?
What do I have to change or add (and where) so that images and featured images don’t link (to themselves) or link where I want them to?Thanks in advance for your help
- The topic ‘Remove links from Featured Image and Images’ is closed to new replies.