Search Results for 'results.php'

Forums › Forums › Search › Search Results for 'results.php'

Viewing 10 results – 81 through 90 (of 1,344 total)
  • Author
    Search Results
  • #262046

    In reply to: Pagination not working


    Trevor
    Participant

    As you are using the Shortcode method (see below about the Divi integration), it would depend on what changes you have made to the results.php template file, especially the pagination.

    I am not sure if it is relevant, but you are not using our Divi Extension? I wonder if this would help (but you would need to use the Divi Blog module, which may not be suitable for you). You can find it for download (if you are logged in) at the top of this guide page:

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

    #262019

    In reply to: Changing results page


    Trevor
    Participant

    I think I understand. You wish to use the Shortcode method, but create you own template. You still need to use our results.php template file, but customize it according to these instructions:

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

    This is only a simple exemplar template, which uses the WordPress Codex structure and PHP.

    So, what to do? You can replace almost anything you want in the file, but keep the if ... else ... endif and the while .... endwhile and transplant your own HTML, PHP and class names to replace our code. Do this slowly and test regularly, keeping backups at each stage.

    The results.php template code will run inside your theme’s standard page template, in the content part, called by our results shortcode.

    #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

    #260429

    Anonymous
    Inactive

    Hi — any idea why I might be getting duplicate results on this page — http://12x.f4e.mwp.accessdomain.com/service/program-leaders/?_sft_grade=6-8&_sft_specialty=ela-general — The query in the url is a good example — I’m just testing with these three girls/posts, so far, and it looks like the results in the top section are correct, but I get the extra list of all three girls below that. This only seems to happen when Ajax is on — seems to work fine whit Ajax off.

    I am using a custom results.php in my child theme and some custom code from Enfold support to deal with a separate issue that was also only occurring with Ajax on. But I took everything from another site with the same setup where it all seems to be working fine (https://abodecommunities.org/services/property-management/properties/).

    Thanks so much!

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

Viewing 10 results – 81 through 90 (of 1,344 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.