Forums Forums Search & Filter Pro Posts Display only with the featured image

Viewing 10 posts - 21 through 30 (of 41 total)
  • Anonymous
    #178145
    This reply has been marked as private.
    Trevor
    #178171

    Hi, this is the new custom results.php file. I cannot access this on your site (it seems to be locked), but this is the content I think you need (I therefore cannot test it):

    <?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="ptb_loops_wrapper clearfix ptb_grid3">
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<article id="post-<?php the_ID();?>" class="ptb_post clearfix post-32080 padi_courses type-padi_courses status-publish has-post-thumbnail hentry ">
                <div class="ptb_items_wrapper entry-content" itemscope="" itemtype="https://schema.org/Article">
                    <div class="ptb_col ptb_col1-1 ptb_col_first">
                        <div class="ptb_module ptb_title">
                            <h2 class="ptb_post_title ptb_entry_title" itemprop="name">
                                <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
                            </h2>
                        </div>
                        <div class="ptb_module ptb_thumbnail">
                            <figure class="ptb_post_image clearfix">
                                <a href="<?php the_permalink(); ?>">
                                    <?php
    				                    if ( has_post_thumbnail() ) the_post_thumbnail("small");
                                    ?>
                                </a>
                            </figure>
                        </div>
                    </div>
                </div>
    		</article>
    		
    		<?php
    	}
    	?>
        </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";
    }
    ?>
    Trevor
    #178178
    This reply has been marked as private.
    Anonymous
    #178183

    I just copied the new version of the code in the results.php

    Trevor
    #178185
    This reply has been marked as private.
    Anonymous
    #178229
    This reply has been marked as private.
    Trevor
    #178247
    This reply has been marked as private.
    Anonymous
    #178351
    This reply has been marked as private.
    Trevor
    #178378
    This reply has been marked as private.
    Anonymous
    #179120
    This reply has been marked as private.
Viewing 10 posts - 21 through 30 (of 41 total)