Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 691 through 700 (of 1,224 total)
  • Author
    Search Results
  • #118140

    In reply to: Visual Results?


    Trevor
    Participant

    BTW, this is the grid making results.php I used for your genesis theme:

    <?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>
    	
    	<?php
    	$odd_check = 1;
    	$first_check = 1;
    	
    	while ($query->have_posts())
    	{
    		$query->the_post();
    
    		if ( $odd_check == 1 ) {
    			$odd_class = " odd";
    		} else {
    			$odd_class = "";
    		}
    		if ( $first_check == 1 ) {
    			$first_class = " first";
    		} else {
    			$first_class = "";
    		}
    		?>
    		<article class="simple-grid one-third<?php echo $odd_class;?><?php echo $first_class;?> post-<?php echo get_the_ID();?> post type-post status-publish format-standard entry">
       <a href="<?php the_permalink(); ?>" class="alignnone">
       <?php the_post_thumbnail("small");?>
    			</a>
    			<header class="entry-header">
        <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
       </header>
    		</article>
    
    		<?php
     	$odd_check++;
    		if ( $odd_check == 3 ) $odd_check = 1;
    	 $first_check++;
    		if ( $first_check == 4 ) $first_check = 1;
    
    	}
    	?>
    	<div style="clear: both;">
    		Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?>
    	</div>
    	
    	<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";
    }
    ?>
    #118040

    Trevor
    Participant

    Hi Sarah, did you follow the customization guide and put a copy of the results.php file in your (child) theme folder?

    If you did, you can open that file and edit it. The Categories, Tags and Date parts are all on their own lines, so simply delete each line.

    #117754

    Trevor
    Participant

    Hi. Great to speak with you Lisa.

    You are going to try the page with the standard results.php to see if that works. If it does, then we will know we will need to modify the one you created.

    #117404

    In reply to: just renewed license


    Anonymous
    Inactive

    Yes I edited the results.php template inside the plugin, templates folder for S&F

    #117385

    In reply to: just renewed license


    Trevor
    Participant

    Hi

    I can see that you are using the Shortcode Method, and that the page has the results shortcode on it, but the results that show, and the alternate no results method, are not ‘standard’. This makes me think that the results.php template file has been edited, but I do not see this file in the child nor master theme folders?

    Did you edit this file? And if you did, did you do so in our plugin’s templates folder?

    #116806

    In reply to: Change Template


    Trevor
    Participant

    Ah, I think that I understand. If you are using the Shortcode Display Results method, you need to follow this customisation guide:

    https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results

    And then edit the results.php file.

    #116797

    In reply to: Visual Results?


    Trevor
    Participant

    Is the ‘showmetheyummy’ site yours, or one that you have found?

    Does your site use the same theme as them? If not, what theme are you using?

    I can see that they use Search & Filter and the Shortcode Display Results method, with a customized results.php file (customized by them, not us).

    #116372

    Trevor
    Participant

    Hi

    As you are making your own template, you need to refer to the WordPress Codex for making pagination. In our plugin folder, you will find a folder called templates and in that is a sample results.php template, which shows fairly standard pagination code. A plugin called WP-PageNavi is also a really good example of how to code it.

    #116180

    Trevor
    Participant

    Hi

    You need to make sure that you have followed the Customization guide here.

    Edit the results.php file like this (where 1234 is changed for the actual ID of your form):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1234)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      // any other message here if no search has been made (can be empty)
    } else {
      // your results.php code here
    }
    #115994

    In reply to: Home page and Results


    Trevor
    Participant

    results.php has basic pagination (as does the default WordPress). To improve this, install the free https://wordpress.org/plugins/wp-pagenavi/ plugin.

Viewing 10 results - 691 through 700 (of 1,224 total)