Forums Forums Search & Filter Pro Only title search

Viewing 1 post (of 1 total)
  • Trevor
    #227954

    Two answers.

    The title only search. You will need to follow the instructions for using the 3rd party Relevanssi plugin, here:

    https://searchandfilter.com/documentation/3rd-party/relevanssi/

    You will need to look through the Relevanssi plugin options for what it searches, and whether it searches for whole words etc. I would not recommend the relevance option in your case.

    The image to be clickable. Follow these instructions to be able to modify the results.php file:

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

    In the standard results.php, see lines 56-62 (yours may now be different) for the image code:

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

    This would need to be changed to:

    <?php
    if ( has_post_thumbnail() ) { ?>
      <a alt="<?php esc_html(get_the_post_thumbnail_caption());?>" href="<?php the_permalink(); ?>"><?php the_post_thumbnail("medium");?></a>
    <?php	} ?>

    Notice I changed the image size also. There are many different sizes you can pick. Normally, the smallest is "thumb"

Viewing 1 post (of 1 total)