Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Customizing Results Using Templates

Viewing 6 posts - 1 through 6 (of 6 total)
  • Sarah B Gregg
    #220223

    Hi Trevor
    I’d like my results to all display the same sized images, and/or when they float left, to snug up to the result box above it instead of leaving awkward spaces. I tried using a plugin to create a new image size ‘homepage-thumb’ and regenerated the images. Then I put that into the template file which I have pasted below.
    Thanks in advance for your help! Let me know if there is anything else you need.

    Here is my results page: https://nbgqa.com/project-gallery/

    Template code (wp-content / themes / headway / search-filter / 1922.php

    <?php
    /**
    * Search & Filter Pro
    *
    * Sample Results Template
    *
    * @package Search_Filter
    * @author Ross Morsali
    * @link http://www.designsandcode.com/
    * @copyright 2015 Designs & Code
    *
    * Note: these templates are not full page templates, rather
    * just an encaspulation of the your results loop which should
    * be inserted in to other pages by using a shortcode – think
    * of it as a template part
    *
    * This template is an absolute base example showing you what
    * you can do, for more customisation see the WordPress docs
    * and using template tags –
    *
    * http://codex.wordpress.org/Template_Tags
    *
    */

    if ( $query->have_posts() )
    {
    ?>

    <div class=”pagination”>

    <div class=”nav-previous”><?php next_posts_link( ‘Older posts’, $query->max_num_pages ); ?></div>
    <div class=”nav-next”><?php previous_posts_link( ‘Newer posts’ ); ?></div>
    <?php
    /* example code for using the wp_pagenavi plugin */
    if (function_exists(‘wp_pagenavi’))
    {
    echo “<br />”;
    wp_pagenavi( array( ‘query’ => $query ) );
    }
    ?>
    </div>

    <div class=”results-container”>
    <?php
    while ($query->have_posts())
    {
    $query->the_post();

    ?>
    <div class=”result-box”>
    “>
    <?php
    if ( has_post_thumbnail() ) {
    echo ‘<p>’;
    the_post_thumbnail(“homepage-thumb”);
    echo ‘</p>’;
    }
    ?>

    <h2>“><?php the_title(); ?></h2>
    <h3 class=”post-excerpt”><?php the_excerpt(); ?></h3>

    </div>

    <?php
    }
    ?>
    </div>

    <div class=”pagination”>

    <div class=”nav-previous”><?php next_posts_link( ‘Older posts’, $query->max_num_pages ); ?></div>
    <div class=”nav-next”><?php previous_posts_link( ‘Newer posts’ ); ?></div>
    <?php
    /* example code for using the wp_pagenavi plugin */
    if (function_exists(‘wp_pagenavi’))
    {
    echo “<br />”;
    wp_pagenavi( array( ‘query’ => $query ) );
    }
    ?>
    </div>
    <?php
    }
    else
    {
    echo “No Results Found”;
    }
    ?>

    Sarah B Gregg
    #220227

    I figured some things out here. Sorry for the pre-mature support request. I figured out that the problem wasn’t with my results.php code, but with the plug-in I was using to regenerate the image sizes. I got a new one and now the page is looking great with some css additions.

    Sarah B Gregg
    #220229
    This reply has been marked as private.
    Trevor Moderator
    #220272
    This reply has been marked as private.
    Sarah B Gregg
    #220284
    This reply has been marked as private.
    Trevor Moderator
    #220296

    Yes, but not yet ready 🙁

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

The forum ‘Search & Filter Pro’ is closed to new topics and replies.