Aligning Post Title and featured image in results

Forums › Forums › Search & Filter Pro › Aligning Post Title and featured image in results

Viewing 10 posts – 1 through 10 (of 18 total)
  • Anonymous
    #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
    #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?

    Anonymous
    #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
    #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?

    Anonymous
    #187307

    Sounds very good. Where can i find it?

    Anonymous
    #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
    #187499

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

    Anonymous
    #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
    #187526
    This reply has been marked as private.
Viewing 10 posts – 1 through 10 (of 18 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.