Forums › Forums › Search & Filter Pro › results.php as a grid
Tagged: results.php
- This topic has 19 replies, 2 voices, and was last updated 8 years, 3 months ago by Anonymous.
-
Trevor(Private) August 10, 2016 at 11:34 am #54088
OK
Can you take a look at the wetsuits page now?
I have used the post thumbnail as the image size (96×960), because I do not know the name of the size of image (and its slug name) that you use on the surfboard page, which has images 160px high?
As the surfboard images are wide, they look OK, but the other products do they need centering?
Trevor
Anonymous(Private) August 10, 2016 at 11:50 am #54091160px would be better, it’s too less detail in that small size – if possible. We dont need that author-name and date, just the title (brand and modell in our case) – both below the image.
Appreciate your first class support, thats really awesome!
Trevor(Private) August 10, 2016 at 12:30 pm #54093Hi Ingo
I took all that time to add the author and date 🙁 LOL
I found a way to list all the media sizes and found the one I need. It was called
td_324x160
.I also found a bug in my coding 😉
I discovered the bug because one of your posts had no title, and one had no image.
Is this matter resolved and can I close the thread? And if you could leave a review …..
Trevor(Private) August 10, 2016 at 12:44 pm #54097This was the results.php modified to work with the Newspaper 7 theme (by TagDiv):
<?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() ) { ?> Es wurden <?php echo $query->found_posts; ?> Wetsuits gefunden<br /> Seite <?php echo $query->query['paged']; ?> von <?php echo $query->max_num_pages; ?><br /> <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 $td_count = 0; while ($query->have_posts()) { $query->the_post(); if ( $td_count == 0 ) { ?> <div class="td-block-row"> <?php } ?> <div class="td-block-span6"> <div class="td_module_1 td_module_wrap td-animation-stack"> <?php if ( has_post_thumbnail() ) { ?> <div class="td-module-image"> <div class="td-module-thumb"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail("thumb");?> </a> </div> </div> <?php } ?> <h3 class="entry-title td-module-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> </div> </div> <?php $td_count = $td_count + 1; if ( $td_count > 1 ) $td_count = 0; if ( $td_count == 0 ) { ?> </div> <?php } } if ( $td_count == 1 ) { ?> hello</div> <?php } ?> Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br /> <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"; } ?>
-
AuthorPosts