-
AuthorPosts
-
November 26, 2013 at 6:58 pm #193539
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
November 27, 2013 at 6:27 am #193719Hey 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,
IsmaelNovember 27, 2013 at 12:13 pm #193843Hi 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
December 2, 2013 at 11:16 am #195240Hi!
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,
PeterDecember 2, 2013 at 5:18 pm #195346Hi,
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
December 3, 2013 at 12:10 pm #195723 -
AuthorPosts
- The topic ‘how to make the big feature image in blog post non clickable.’ is closed to new replies.
