Forums Forums Search & Filter Pro Clickable image thumbnail

Tagged: ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #218347

    Hi, is there an article explaining how to make the featured image/thumbnail in the results page clickable? I searched for it but couldn’t find it. I think it is a common question so might want to add it in the F.A.Q.

    Anonymous
    #218349

    The same goes for the title.

    Trevor
    #218379

    What Display Results method are you using?

    Anonymous
    #218386

    Sorry, the title is clickable, so it’s just the featured image that needs to be clickable. I’m using the Shortcode.

    Trevor
    #218394

    Ah. OK.

    The documentation for this method is here:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    Note the section ‘Customising the Results’ and follow that.

    See lines 56-62:

    			<?php 
    				if ( has_post_thumbnail() ) {
    					echo '<p>';
    					the_post_thumbnail("small");
    					echo '</p>';
    				}
    			?>

    They need the link adding, like this:

    			<?php
    				if ( has_post_thumbnail() ) { ?>
    					<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail("small");?></a>
    			<?php	} ?>
Viewing 5 posts - 1 through 5 (of 5 total)