Thumbs in search results

Home Forums Best Commerce Thumbs in search results

  • This topic is empty.
Viewing 4 posts - 11 through 14 (of 14 total)
  • Author
    Posts
  • #11906
    Anonymous
    Inactive

    So the solution for everyone that wants an image next to the article in search results is:

    Edit the theme/template-parts/content-search.php and add the following lines of code after line 21

        <div class="entry-img" style="float:left">
                     <?php
                     if ( has_post_thumbnail() ) { // check if the post Thumbnail
                         the_post_thumbnail(thumbnail);
                     } else { //your default img
                     }
                     ?>
                 </div>

    Then edit styles.css locate the .entry-summary and paste this instead

    .page-content,
    .entry-content,
    .entry-summary {   margin: 15px 0 0;
    	padding-bottom: 100px;
    }

    And you will get the following result:
    search result

    #11917
    Axle Support
    Moderator

    Hi @johnnyd,

    You can give margin or padding right to the image to add a gap between image and content.

    #12093
    Anonymous
    Inactive

    Hey mate sorry for the delayed answer that is what I have done in the solution above. And that is why I have highlighted it as an answer. https://axlethemes.com/support-forum/topic/thumbs-in-search-results/page/2/#post-11906

    #12189
    Axle Themes
    Keymaster

    Great

Viewing 4 posts - 11 through 14 (of 14 total)
  • The topic ‘Thumbs in search results’ is closed to new replies.