Forums Forums Search & Filter Pro Updating baseline formatting

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #196409

    Hello. Within the results.php, can we add a <div> wrapping the featured image, as well as a <div> wrapping and post details? I have been working with this plugin for some time and the only thing I see which is a downside is not having the ability to control the layout since the elements are not housed in wrapping containers.

    Additionally, could the logic be re-written so that there are never any empty <p></p> tags rendered? This is a problem that causes formatting issues as well.

    <div class=”postFeatureGraphic”>
    <?php
    if ( has_post_thumbnail() ) {
    echo ‘<p>’;
    the_post_thumbnail(“small”);
    echo ‘</p>’;
    }
    ?>
    </div>
    <div class=”postDetails”>
    <h2>“><?php the_title(); ?></h2>
    <p class=”postDate”><?php echo get_the_date(); ?></p>
    <p><?php the_category(); ?></p>
    <p class=”postExerpt”><?php the_excerpt(); ?></p>
    </div>

    Trevor
    #196427

    You can edit that file to your heart’s content. Some people almost completely re-write it. It is only intended as a simple exemplar. Often, you will find theme template use a similar If and while structure, and you can often copy and paste chucks of code from the theme templates into our results.php file.

    Make sure the copy you are editing is within your child theme folder, in a sub folder called search-filter.

    Anonymous
    #196447

    Thanks, Trevor. So to copy the results.php to my child theme and customize, would I create a folder called “search-filter” at the root of the child theme, then under that add another folder called “templates” housing the templates.php? I’m assuming that the folder structure would need to match.

    Thanks for all your help!

    Trevor
    #196457

    No templates folder. results.php goes directly in to the search-filter folder. See this page:

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

    Anonymous
    #196467

    Perfect. Thanks again for your help!

    Trevor
    #196469

    Is it OK to close this thread?

    Anonymous
    #196471

    Yes sir. Thank you!

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