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 Aligning Post Title and featured image in results

Viewing 10 posts - 1 through 10 (of 18 total)
  • Leander Leist
    #187095

    Hey, i am trying to make S&F show the results like this:

    featured image from Post , post title

    i would like to have them in one line.

    This is my Code so far:

    <?php
    /**
    * Search & Filter Pro
    *
    * Sample Results Template
    *
    * @package Search_Filter
    * @author Ross Morsali
    * @link https://searchandfilter.com
    * @copyright 2018 Search & Filter
    *
    * 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() )
    {
    ?>

    <?php echo $query->found_posts; ?> Ergebnisse gefunden<br />

    <div class=”pagination”>

    <div class=”nav-previous”><?php next_posts_link( ‘Older posts’, $query->max_num_pages ); ?></div><br />
    <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
    while ($query->have_posts())
    {
    $query->the_post();

    ?>
    <div>
    <h2>“><?php the_title(); ?></h2><br />

    <?php
    if ( has_post_thumbnail() ) {
    echo ‘<p>’;
    the_post_thumbnail(“small”);
    echo ‘</p>’;
    }
    ?>

    </div>

    <hr />
    <?php
    }
    ?>

    <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”;
    }
    ?>

    ##################################################################################

    Thanks for your help

    regards
    Leander

    Trevor Moderator
    #187149

    This would normally be done in ‘columns’ in most themes or page builders. Excluding Search & Filter related pages, do you have an example page (either in your site, or a demo site for your theme) that shows a similar layout?

    Leander Leist
    #187280

    This is the site i am working on.
    https://leist.osteopathiefortbildung.de/index.php/kurse/

    I am using BeTheme and Visual Composer / WP Bakery Page Builder. There is an option called Post Grid, that i used on the “Dozenten” Page to Display Posts. Its not the same but similar.

    This has Posts shown in the lower area. Its BeTheme.
    https://themes.muffingroup.com/be/press/

    I think columns would work. Two. Image left, Title / Link right.

    hope this is Helpful.

    Thanks!

    Trevor Moderator
    #187282

    Would it work for you to use Visual Composer then, as we have an addon for it to work with the Post grid element anyway?

    Leander Leist
    #187307

    Sounds very good. Where can i find it?

    Trevor Moderator
    #187313
    Leander Leist
    #187495

    Perfect Solution! Thanks a lot.

    There is one problem though. The submit button does not work. I tried to enable auto submit, even tough it changes the url the results do not get loaded according to the new filters. This happens only if i reload the page manually.

    Can this be fixed somehow?

    Trevor Moderator
    #187499

    Can you give the me current search page URL, and details steps I need to take to see this?

    Leander Leist
    #187522

    https://leist.osteopathiefortbildung.de/index.php/kurse/

    Just use one of the dropdown filters.
    it should automatically load the results or load them after clicking the Button.
    But it doesn’t. Thats the problem.

    Trevor Moderator
    #187526
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 18 total)

The topic ‘Aligning Post Title and featured image in results’ is closed to new replies.