-
AuthorPosts
-
April 19, 2015 at 9:26 am #430847
Hi, is there a way to show the featured images of the posts shown in the search results page?
April 20, 2015 at 4:44 pm #431410Hey DROR!
You can refer to this link: https://kriesi.at/support/topic/add-featured-image-to-search-results/#post-249161
Regards,
YigitApril 20, 2015 at 7:35 pm #431540This reply has been marked as private.April 21, 2015 at 8:43 am #431812Hi!
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,
IsmaelApril 21, 2015 at 8:48 am #431816This reply has been marked as private.April 21, 2015 at 8:56 am #431821Also, 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.
April 22, 2015 at 6:44 am #432575Hi!
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,
IsmaelApril 22, 2015 at 8:53 am #432623Great stuff :)
Final thing, how can I make the post titles bigger in the search results without effecting any other title across the site?
Thanks
April 22, 2015 at 8:58 am #432625This reply has been marked as private.April 23, 2015 at 7:11 am #433263Hi!
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!
IsmaelApril 23, 2015 at 3:19 pm #433519OK, 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?
April 24, 2015 at 4:29 pm #434203Hi!
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,
YigitApril 24, 2015 at 4:49 pm #434236OK, thanks :)
-
AuthorPosts
- The topic ‘How to show post images in the search results’ is closed to new replies.
