-
AuthorSearch Results
-
October 2, 2020 at 11:34 am #261719
In 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 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.
September 22, 2020 at 7:50 am #260252In reply to: Results showing up twice
TrevorParticipantI 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.
September 21, 2020 at 4:08 pm #260196In reply to: Posts per page isn’t working correctly
TrevorParticipantFor 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?
September 21, 2020 at 6:48 am #260102Topic: Post grid results display
in forum Search & Filter Pro
AnonymousInactiveHi!
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
-
AuthorSearch Results
-
Search Results
-
Topic: Post grid results display
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