Hi, is there a way to show the featured images of the posts shown in the search results page?
Hey DROR!
You can refer to this link: https://kriesi.at/support/topic/add-featured-image-to-search-results/#post-249161
Regards,
Yigit
Hi!
Use this in the Quick CSS field:
span.search-result-counter, span.search-result-counter img {
width: 100%;
height: auto;
position: relative;
border-radius: 0;
}
Best regards,
Ismael
Also, how can I make the images link to the post? As they are now, they aren’t linking to the post and only the post title is the link.
Hi!
Replace the code with this to create a link:
$searchthumb = get_the_post_thumbnail( $post_id, $size, $attr );
echo "<span class='search-result-counter {$counterclass}'><a title='".the_title_attribute('echo=0')."' href='".get_permalink()."' $markup>{$searchthumb}</a></span>";
Add this in the Quick CSS field to align the search result:
#top .template-search.content .entry-content-wrapper {
padding-left: 0;
}
Best regards,
Ismael
Great stuff :)
Final thing, how can I make the post titles bigger in the search results without effecting any other title across the site?
Thanks
Hi!
Use this to make the font size bigger:
.template-search .entry-content-wrapper .post-title {
font-size: 25px;
}
There is no special script to keep the images from loading automatically. I think it’s just a delay.
Cheers!
Ismael
OK, thanks.
Is there a way to make the search results page full width (no sidebar) and to have it display the results in a masonry gallery with the title showing always and once hovering it will also show the excerpt?
Hi!
Please add following code to Quick CSS
.search-results .sidebar { display: none !important; }
.search-results .content { width: 100%!important; border: none !important; }
It is currently not possible to display search results in masonry. If you really need it, please hire a freelance developer
Best regards,
Yigit
OK, thanks :)