Forums Forums Search & Filter Pro Show results in grid

Viewing 10 posts - 11 through 20 (of 30 total)
  • Anonymous
    #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
    #64030

    and 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
    #64033

    Yes I want it to look like the last link.
    No I didn’t use the code you gave me.

    Trevor
    #64042

    Do you understand how to use the code I gave you? Maybe I can show you on Skype?

    Anonymous
    #64058

    Yes, 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.

    Trevor
    #64062

    You need to be using the shortcode method

    And to have made a custom result.php file as shown in the documentation. It will not be perfect for you, but close, and I hope you will see what i have done in making it (the method).

    Anonymous
    #64070

    I’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
    #64080

    I think my code needs more HTML adding. Before and after the while loop. I will work on it. This is difficult to do when I am remote like this.

    Anonymous
    #64097
    This reply has been marked as private.
    Trevor
    #64173

    OK. 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 🙁

Viewing 10 posts - 11 through 20 (of 30 total)