-
AuthorSearch Results
-
October 6, 2020 at 12:40 pm #262046
In reply to: Pagination not working
TrevorParticipantAs 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:
October 6, 2020 at 10:53 am #262019In reply to: Changing results page
TrevorParticipantI 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 ... endifand thewhile .... endwhileand 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.
October 2, 2020 at 11:34 am #261719In reply to: Pagination Style
TrevorParticipantI 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>September 23, 2020 at 5:22 pm #260508In reply to: duplicate results
AnonymousInactiveThanks 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"; } ?>September 23, 2020 at 5:10 pm #260501In reply to: duplicate results
TrevorParticipantThere 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:
September 23, 2020 at 8:18 am #260429Topic: duplicate results
in forum Search & Filter Pro
AnonymousInactiveHi — 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!
September 22, 2020 at 7:09 pm #260400In reply to: Customizing Results
AnonymousInactiveThanks a lot! this is very helpful.
Kadence works well with the Archives. I’ll check results.php.September 22, 2020 at 3:25 pm #260352In reply to: Results showing up twice
TrevorParticipantAs 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.
September 22, 2020 at 10:57 am #260302In reply to: Customizing Results
TrevorParticipantPrandam, 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.
September 22, 2020 at 8:37 am #260267In reply to: Infinite Scroll second page is not loading
TrevorParticipantIf 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.
-
AuthorSearch Results
Search Results for 'results.php'
-
Search Results
-
Topic: duplicate results
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!