Tagged: Images, search results, thumbnails
-
AuthorPosts
-
April 22, 2021 at 1:51 pm #1296052
Hi,
i’m struggling to get images in my search results page. I already tried some workarounds here in the forum but it doesn’t work for me.
Only a circle with a number will be showing actually. In the search preview i can see images in the circle but not in the search results page.
Any hints for me to get this running?
Thank you.Best, Oliver
April 22, 2021 at 2:44 pm #1296077go and create a subfolder to your child-theme : includes
put in the edited : loop-search.phpyou can see the edited element here: https://pastebin.com/KQYvfYhm
download: https://pastebin.com/dl/KQYvfYhmonly lines 33,34,35 are added
Guess if the folder structure is similar to the parent folder structure – this will take effect immediately – otherwise try this:
https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-albThe Rest is quick css styling.
April 22, 2021 at 2:54 pm #1296082see here: https://kriesi.at/support/topic/show-featured-images-in-search-results-page/#post-805253
and alternative – a little image inside the circle.
April 22, 2021 at 3:30 pm #1296098Hi,
thanks for your reply. I’ve already tried this and just tried again now.
Unfortunately, this doesn’t work for me. Still no images on the search results page.
Any other ideas?Thanks.
Best, Oliver
April 22, 2021 at 11:59 pm #1296149And your posts and pages all got featured images ?
April 23, 2021 at 9:10 am #1296236Hi Guenni,
yes, of course because it’s the crucial for our SEO!
Any hints?
Thank you.Best, Oliver
April 23, 2021 at 9:36 am #1296241read carefully – my posts – if it works on my Enfold it should work on yours too:
https://webers-testseite.de/?s=WordpressApril 23, 2021 at 10:54 am #1296283Thanks Guenni! It’s working now. How i get the Circle Images in the search results page? At the moment, all images are a bit too big.
Any hints?Thanks.
April 23, 2021 at 11:19 am #1296291first – you can make them smaller – on my page i have this as quick css entry:
.search-result-image img { width: 200px; /**** here you can adjust the image sizes shown ***/ border: 1px solid #aaa } a.slide-image.search_image { overflow: visible !important; } a.search_image .image-overlay.overlay-type-extern { left: 0 !important }
next tip: this line of the replaced code:
$searchthumb = get_the_post_thumbnail( $the_id, 'large' );
it will take the large images from enfold recalculation as source for those thumbnails.
if you have:
$searchthumb = get_the_post_thumbnail( $the_id, 'portfolio_small' );
it will have that source image for it._____________
see here: https://kriesi.at/support/topic/show-featured-images-in-search-results-page/#post-805253
now the line is on Enfold 4.8.2 line 33
echo "<span class='search-result-counter {$counterclass}'>{$post_loop_count}</span>";
replace that whole line 33 with:
$searchthumb = get_the_post_thumbnail( $the_id, 'large' ); echo "<span class='search-result-counter {$counterclass}'>{$searchthumb}</span>";
and this to quick css:
.search-result-counter { padding: 0; } .search-result-counter img { width: 100%; height: 100%; border-radius: 100px; }
April 23, 2021 at 11:29 am #1296297Vielen Dank für deine Hilfe! Hat alles funktioniert….
April 24, 2021 at 2:38 am #1296443Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘images in the search results page’ is closed to new replies.