How to display featured images in search results page?

Is it possible to display the featured image of each result item in the search results page ?

Comments

  • Hi,

    because in search, different types of pages display, it is not possible to display featured images unfortunately.

    Thanks for understanding!
  • Thanks for your reply.

    Is it possible to use an external search engine to search in portfolio items and display a page of results based on portfolio template?

    Betheme is a fantastic theme, very versatile and powerful. I love it, but it lacks an image search in portfolio, I use the Searchford plugin to display a live search dropdown windows of thumbnails. It works well, but when you click on Search results, it use the Betheme search, so no images are displayed. You can see it in action on my site :

    http://myngocpierre.fr  (use the sliding top to search a term in portfolio, eg Pierre)

    May be is it possible to generate a portfolio category on the fly with the search term and display it as a portfolio-type?

    Do you intend to improve the search function in the future, for example the possibility to customize the results page?
  • edited July 2015
    At this moment none of these features are not included and it is not possible to do this.
  • I would also like to add an image to the search results page, specifically for woocommerce products. I identified the file search.php in the main theme folder. When it's renamed an image shows. It looks like another template file is being used when this file is not available. Where is the search file that shows the image and can this file be moved to the child theme to show images?
  • @wokabout The file you are talking about you found under theme folder but originally, wordpress is using index.php file and the images appears because WP is using blog page to display search results.
  • Sorry to read that. That's really very dissapointed, neither a picture? a portfolio view?

    In all the themes i have used i have been able to change the options of archive and search someway, sidebar, style of items... :(
  • Looking for the same thing... Any notice?
  • We havent yet done anything with the search results page. I will let the dev team know about it.
    thanks
  • Hi, guys, I’m in no way trying to be a “jump on the bandwagon and say, Me, Too!”, but I own a photography website, and this addition would really help my clients when they are searching through my items. Can a simple update be done to show the image of any page/post type *if* a featured image is present for whatever type the result is?

    I have images for sale in my posts, and when clients type “sunset”, for example, showing a list of sunset photos would be great. Just an idea... however, I really love the BeTheme theme!
  • rkyoungster
    Hey,
    all we can do is to think about adding the featured image to the search results. The wordpress default search that we use could be not enough for your needs. We suggest installing a third party plugin for this.
    thanks
  • Thanks, team. I appreciate it. For anyone else I was able to add images to my searches by adding the following code in the search.php file.

               <div class="entry">

                    <?php
                        if ( has_post_thumbnail() ) { // check if the post Thumbnail
                            the_post_thumbnail('medium-large');
                        } else {
                            //your default img
                        }

                        the_excerpt(); //your short description
                    ?>
                </div>

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.