-
AuthorPosts
-
April 17, 2014 at 2:25 pm #252705
Hi, I would like to make the feature images in the blog page clickable so that when a visitor clicks on the image it will take him to the post.
As it is now, only the title is a link to the post.
Thanks.
April 18, 2014 at 12:13 pm #253124Hi bakbek!
Thank you for using the theme!
The featured images on the blog overview page should be clickable and link to the actual posts by default. What type of blog style do you have? If you don’t mind, we would like to see the actual blog page.
Cheers!
IsmaelApril 18, 2014 at 8:37 pm #253279This reply has been marked as private.April 21, 2014 at 11:50 pm #254051Hi!
Have you made any changes on theme files?
Please update Enfold to the latest version 2.6.4 – http://kriesi.at/documentation/enfold/updating-your-theme-files/Cheers!
YigitApril 24, 2014 at 1:25 pm #255465Updated it to version 2.7 but the featured images are still not clickable.
April 25, 2014 at 2:33 pm #256093Hey!
Anchor tag is not being output. Please try deactivating all active plugins and re-upload featured images and check if that helps. Have you made any changes on theme files?
Regards,
YigitApril 27, 2014 at 9:44 am #256750Don’t think I changed any theme files and if I did, I updated the theme so if I did make such changes they would be overwritten with the new file, right?
April 27, 2014 at 10:01 am #256752I deactivated all plugins and uploaded the featured image again but still the featured image is not clickable…
April 28, 2014 at 9:16 am #256948Hey!
Thank you for using the theme!
Please edit includes > helper-post-formats.php, find this code on line 164:
if(!function_exists('avia_image_slideshow_filter')) { function avia_image_slideshow_filter($current_post) { $prepend_image = get_the_post_thumbnail(get_the_ID(), 'large'); $image = ""; if(!$prepend_image) { $image = avia_regex($current_post['content'],'image'); if(is_array($image)) { $image = $image[0]; $prepend_image = '<div class="avia-post-format-image"><img src="'.$image.'" alt="" title ="" /></div>'; } else { $image = avia_regex($current_post['content'],'<img />',""); if(is_array($image)) { $prepend_image = '<div class="avia-post-format-image">'.$image[0]."</div>"; } } } else { $prepend_image = '<div class="avia-post-format-image">'.$prepend_image."</div>"; } if(!empty($prepend_image) && is_string($prepend_image)) { if($image) $current_post['content'] = str_replace($image, "", $current_post['content']); $current_post['before_content'] = $prepend_image; $current_post['slider'] = ""; } return avia_default_title_filter($current_post); } }
Replace it with this:
if(!function_exists('avia_image_slideshow_filter')) { function avia_image_slideshow_filter($current_post) { $prepend_image = get_the_post_thumbnail(get_the_ID(), 'large'); $imagelink = get_permalink(); $image = ""; if(!$prepend_image) { $image = avia_regex($current_post['content'],'image'); if(is_array($image)) { $image = $image[0]; $prepend_image = '<div class="avia-post-format-image"><a href="'.$imagelink.'"><img src="'.$image.'" alt="" title ="" /></a></div>'; } else { $image = avia_regex($current_post['content'],'<img />',""); if(is_array($image)) { $prepend_image = '<div class="avia-post-format-image"><a href="'.$imagelink.'">'.$image[0]."</a></div>"; } } } else { $prepend_image = '<div class="avia-post-format-image"><a href="'.$imagelink.'">'.$prepend_image."</a></div>"; } if(!empty($prepend_image) && is_string($prepend_image)) { if($image) $current_post['content'] = str_replace($image, "", $current_post['content']); $current_post['before_content'] = $prepend_image; $current_post['slider'] = ""; } return avia_default_title_filter($current_post); } }
Cheers!
IsmaelApril 28, 2014 at 11:22 am #256995Great. That worked.
Thanks.
-
AuthorPosts
- The topic ‘How to make the featured image in the blog view clickable’ is closed to new replies.