Hi,
I want to keep the big feature image in blog post but i don’t want it to be clickable. At the moment when you hoover on it it change color and there is the little circle telling you you can click on it to open it and I don’t want that..
How can I do?
Kind regards,
Delphine
Hey Delphiine!
What type of Blog Style do you have right now? Can you please give us a link to the blog page? Add this on your custom.css or Quick CSS:
.big-preview.multi-big a {
pointer-events: none;
}
Regards,
Ismael
Hi Ismael,
The code is not working because I use the grid blog.
I tried
.big-preview.grid-big a {
pointer-events: none;
}
but it’s not working as well..I don’t know which class you use for the grid blog. ;-)
My site is on maintenance mode.
Kind regards,
Delphine
Hi!
The pointer-events css attribute is not supported by all browsers and I recommend to modify the single post template directly. Open up /wp-content/themes/enfold/includes/loop-index.php and replace
//echo preview image
if(strpos($blog_style, 'big') !== false)
{
if($slider) $slider = '<a href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>';
if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>';
}
with
//echo preview image
if(strpos($blog_style, 'big') !== false)
{
if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>';
}
The code modification removes the link around the image and the user can’t click on it anymore.
Regards,
Peter
Hi,
Thanks. I have two questions though.
If I don’t want this change to be erased by a new update, knowing that I made a child theme, do I have to put a copy of loop-index.php in my child theme or copy the whole “include” file?
And if I include other images but inside my post, will they still be clickable?
Kind regards,
Delphine