Forums › Forums › Search & Filter Pro › Show results in grid
- This topic has 30 replies, 2 voices, and was last updated 8 years, 8 months ago by
Trevor.
-
Anonymous(Private) October 14, 2016 at 2:20 pm #64022
Yes, I want this page as results.
The layout of this page can be customizable in the options of the theme:
Theme Options> Hubs> Hub Categories> Format.On the demonstration site, the format is set to “Standard”.
I created the same page on my site :
http://www.filmspourenfants.net/v2/hubs/films/The only thing that is different from the demo theme is the “format” of the page. I chose the format “4 colomnes” instead of standard.
Trevor(Private) October 14, 2016 at 2:33 pm #64030and you want it to look like this last link you gave to me?
http://www.filmspourenfants.net/v2/hubs/films/
If yes, did you use the code that I gave to you?
Anonymous(Private) October 14, 2016 at 3:00 pm #64058Yes, I understand but I did not used it because I thought he was referring to the message of yesterday.
In which I have given you the following example page:
http://gauge.wpengine.com/blog/columns-blog/It was the archive page of posts (blog)
Now, if you tell me to use this code as it works, I’ll do it 🙂
But I have a doubt.
Anonymous(Private) October 14, 2016 at 3:17 pm #64070I’m using shortcode on my page :
http://www.filmspourenfants.net/v2/films/I made acustom result.php file as shown in the documentation
I replace a part of the file by the code you gave me, but see the result, it is not working.
Trevor(Private) October 15, 2016 at 10:02 am #64173OK. This is the complete, revised results.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() ) { ?> Found <?php echo $query->found_posts; ?> Results<br /> 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> <div class="gp-blog-wrapper gp-blog-columns-3"> <div class="gp-inner-loop ajax-loop"> <?php while ($query->have_posts()) { $query->the_post(); ?> <section class="gp-post-item post-<?php get_the_id();?> post type-post format-standard has-post-thumbnail category-post-formats" itemscope="" itemtype="http://schema.org/Blog"> <div class="gp-post-thumbnail gp-loop-featured"> <div class="gp-image-above"> <a href="<?php the_permalink(); ?>"> <?php if ( has_post_thumbnail() ) { the_post_thumbnail("small", array('class' => 'gp-post-image gp-large-image')); the_post_thumbnail("thumb", array('class' => 'gp-post-image gp-mobile-image')); } ?> </a> </div> </div> <div class="gp-loop-content gp-image-above"> <h2 class="gp-loop-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <div class="gp-loop-text"> <?php the_excerpt(); ?> </div> </div> <div class="gp-loop-meta"> <span class="gp-post-meta gp-meta-author"> <?php the_author_link(); ?> </span> <time class="gp-post-meta gp-meta-date" datetime="<?php the_date();?>"> <?php the_date(); ?> </time> </div> </section> <?php } ?> </div></div> 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"; } ?>
The posts all need featured images, many do not have them. It would also be a good idea to make manual excerpts for them all, as your theme seems to leave the excerpt very long 🙁
-
AuthorPosts