Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 791 through 800 (of 1,224 total)
  • Author
    Search Results
  • #83677

    Trevor
    Participant

    I have written a new results.php for you:

    <?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="col-9 hb-equal-col-height hb-main-content">
    		<div id="hb-blog-posts" class="hb-blog-grid masonry-holder clearfix" data-layout-mode="fitRows" data-categories="" data-column-size="col-4">
    	
    	<?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
       <article id="post-<?php echo get_the_ID();?>" class="col-4 post-<?php echo get_the_ID();?> post type-post status-publish format-standard has-post-thumbnail hentry" itemscope="" itemtype="http://schema.org/BlogPosting">
    				<div class="featured-image">
    					<a href="<?php the_permalink(); ?>">
    			<?php 
    				if ( has_post_thumbnail() ) {
    					the_post_thumbnail("small");
    					?>
            <div class="featured-overlay"></div>
            <div class="item-overlay-text" style="opacity: 0;">
              <div class="item-overlay-text-wrap" style="padding-top: 0px;"> <span class="plus-sign"></span> </div>
            </div>
       <?php
    				}
    			?>
    					</a>
    				</div>
    				<div class="post-content">
    					<div class="post-header">
       			<h2 class="title" itemprop="headline"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    					</div>
     			 <p><?php echo get_the_excerpt(); ?>
    	 			<br /><a href="<?php the_permalink(); ?>" class="read-more">Read More</a>
    		 		</p>
    				</div>
      	</article>
    		
    		<?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";
    }
    ?>
    #82551

    Trevor
    Participant

    Hi Nathan

    Have you made a customizable version of the results.php file, as shown in the documentation?

    This can be edited to any HTML structure that you want, and the code to show the thumbnail uses standard code from the WordPress codex, so you can change the size of the image to what you need using the standard size names (like thumb for thumbnail).

    #82390

    Anonymous
    Inactive

    Hi Trevor,

    We were using an edited results.php, but I already tried replacing it with the results.php from the newest version of the plugin to rule that out as a cause.

    In order to help you troubleshoot, the results.php that is now on our page is an unedited version.

    Thanks,

    Ben

    #82350

    Trevor
    Participant

    You appear to be using the shortcode results method. Have you edited the results.php template that this method uses, and if so, can you post the contents of that file here, inside ‘code’ tags (the button for this is in the editor toolbar).

    #81758

    Trevor
    Participant

    You are working on a customized version of the results.php and before making changes the pagination worked, but now it does not? If this is so, can you posts here, inside code tags (in the editor toolbar) the complete results.php file?

    #81418

    Anonymous
    Inactive

    Hi Trevor,

    thank you for you reply.

    I have chosen the Shortcode results method. Therefore, I have looked at the link you suggested.

    I have followed the instructions and created the results.php. Then I have deleted the part in the code showing the message of the number of results.
    As a first and quick step, to me it’s ok.

    About point 2 in my original question:
    a) is having the results displayed in a grid achievable with the Shortcode results method?
    b) is there some quick combination with a plugin like Essential grid (that I have installed) or else?

    Regards

    #80545

    Anonymous
    Inactive

    I checked my theme folder and no results.php is there (both parent and child themes). Should it be there?

    #80534

    Trevor
    Participant

    OK, thanks for trying that. Can you confirm that the results.php template that S&F uses on your setup is unedited/unchanged?

    #80197

    Trevor
    Participant

    From what I can see, you have made some changes to the results.php file. Can you paste the contents of the file here inside code tags?

    #80195

    In reply to: ACF Issues


    Trevor
    Participant

    Hi Martyn

    The easiest way to do this (doesn’t take me too long to od, so i can help you need it) is to take a page in your theme that looks the way you want and then edit our results.php file to have the same HTML structure to clone the look.

    Starting this customisation process is described here.

Viewing 10 results - 791 through 800 (of 1,224 total)