Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #164854

    Hello, great theme!

    Is there a way to show thumbnails (of post’s featured image) on search results page? I looked through the forum and was unable to find a clear answer.



    Hey rbellei!

    Edit includes > loop-search.php, find this code:

    $post_format = get_post_format() ? get_post_format() : 'standard';

    Below, add this code:

    $thumb = get_the_post_thumbnail(get_the_ID(), $avia_config['size']);

    Then again find this code:

    echo "<span class='search-result-counter {$counterclass}'>{$post_loop_count}</span>";
    				//echo the post title

    Below, add this:

    echo "<div class='search-thumb'>".$thumb."</div>";

    Go Enfold > Styling > Quick CSS then add this code to resize the thumbnail.

    .search-thumb {
    	width: 300px;
    	height: 200px;
    	margin-bottom: 10px;
    .search-thumb img {
    	width: 100%;
    	height: 100%;

    Best regards,


    It works!

    Thank you Ismael.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Thumbnails on search results page’ is closed to new replies.