Forums Forums Search Search Results for 'results.php'

Viewing 10 results - 81 through 90 (of 1,224 total)
  • Author
    Search Results
  • #261719

    In reply to: Pagination Style


    Trevor
    Participant

    I don’t see any pagination there, but I assume that you are using the pagination code in our results.php template file.

    To make the pagination look nicer, install the free WP-PageNavi plugin and delete these lines in the results.php template file:

    <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>
    #260508

    In reply to: duplicate results


    Anonymous
    Inactive

    Thanks so much!! I’m trying the code tick thing here, but here’s a link to the file, too, just in case: https://www.dropbox.com/s/lq01m81d0zc5qnt/results.php?dl=0 — Thanks again for the prompt reply and support!

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      https://searchandfilter.com
     * @copyright 2018 Search & Filter
     * 
     * 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
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
    		<div>			
    			<p><?php the_content(); ?><p>			
    		</div>
    		
    		<hr />
    		<?php
    	}
    	?>
    	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";
    }
    ?>
    #260501

    In reply to: duplicate results


    Trevor
    Participant

    There is a coding problem in the results.php template file, so I will need to see that file. You can post it here, but inside code ticks (one before the code, one after). On my UK Windows keyboard, the code tick key is next to the 1 key in the standard part of the keyboard. If you do this Google search and look at the images, they show various keyboards and where the key is located:

    https://www.google.com/search?q=back+tick+code+key

    #260400

    In reply to: Customizing Results


    Anonymous
    Inactive

    Thanks a lot! this is very helpful.
    Kadence works well with the Archives. I’ll check results.php.

    #260352

    Trevor
    Participant

    As you are using the shortcode method, can you save the results.php file you are using somewhere safe, and use the default exemplar results.php template that we supply with the plugin?

    Does that work OK?

    If it does, remove from that any code you won’t be using, and test again. If that is OK, then SLOWLY add code back in until it fails. I cannot actually debug your code, as that is outside the scope of our support, sorry.

    #260302

    In reply to: Customizing Results


    Trevor
    Participant

    Prandam, if the Kadence Theme Pro is a Framework theme (I am not familiar with this theme) then using the ‘As an Archive’ and ‘Post Type Archive’ display results methods may not work for you. This is because many ‘framework’ themes use complex structures of PHP files to create the pages, and do not work in the ‘standard’ WordPress manner (per the WordPress Codex, which uses relatively simple archive template files, such as search.php and archive.php, which can be (are designed/intended to be) modified/modifiable by the user). Thus we find it difficult to hook in to the results query and loop, to control the results shown.

    For such complex themes as perhaps Kadence Pro is, you would need to use a Page Builder or Grid Builder plugin to create the search/results page. If you want to code things yourself, you can use our Shortcode method, as it uses a simple results.php template that you can edit/customize (but you may need the help of a third party coder):

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/

    Some free page builders (such as SiteOrigin) can sometimes also be made to work, using much the same method as described here for the most likely solution that you might use (a free grid builder plugin):

    https://searchandfilter.com/documentation/3rd-party/post-grid/

    We also support the much more powerful and very popular Elementor Pro page builder premium (paid) plugin:

    https://searchandfilter.com/documentation/3rd-party/elementor/

    Plus we support others like WPBakery Page Builder and Beaver Builder. Some others may also be supported in some way, but ask before committing to using any others.

    #260267

    Trevor
    Participant

    If you have taken the original code from our exemplar results-infinite-scroll.php and pasted that in to the results.php file (it is that file that will be used by our plugin), and unset the container settings (leave them blank), it should all work.

    #260252

    Trevor
    Participant

    I think that the issue is that the selectors all have to be in the results.php template, and not loaded in that external code call. The Infinite Scroll works by asking the results.php file to reload the PHP part of the results.php file that is specified. If that classname is not actually in that file, but is instead inside another file called from within the loop, it won’t be found. Thus, it cannot ‘clear’ them. You may have to grab the code from that external code call and bring it directly inside the resuls.php file.

    #260196

    Trevor
    Participant

    For me it goes:

    12
    5
    5
    12
    12 and seems to stay with 12 as I continue.

    What happens if you revert it to the standard results.php file?

    #260102

    Anonymous
    Inactive

    Hi!

    I want to prevent the result appeared before clicking the button or selecting any search form field.
    I’ve used this https://support.searchandfilter.com/forums/topic/results-display-3/, and it worked.

    However, when I try to use Post Grid plugin to customize the display, the result is always shown after page load (same as before using custom results.php).
    How to fix that?

    Thank you

Viewing 10 results - 81 through 90 (of 1,224 total)