Forums › Forums › Search & Filter Pro › Results count… can't make it work
- This topic has 18 replies, 2 voices, and was last updated 7 years, 8 months ago by Trevor.
-
Anonymous(Private) April 26, 2017 at 6:27 pm #105029
Trevor I don’t understand your question.
I actually got $total_results = $query->found_posts; and echo $total_results.If you ask for Search&Filter form options in “display results tab” I got this:
Results URL: http://stude.masterbip.com/test/
Load results using Ajax? YES
Make searches bookmarkable? YES
Only use Ajax on the results page? NO
Scroll window to: none
Ajax Container: #propresults
Pagination Type: Normal
Pagination selector: .paginacion ul li a
Show loading icon? YESI can give you admin credentials if you want. Many thanks!
I think all is working but that results counter…
Thanks again in advance!
Trevor(Private) April 27, 2017 at 2:08 pm #105232Hi. You have ‘Use Background Processes’ disabled in the plugin settings. This will mean that the results may be wrong unless you keep up to date with rebuilding the cache.
So, to the code. This code is wrong:
$total_results = $query->found_posts;
It must be:
$total_results = $wp_query->found_posts;
I have edited it for you.
Anonymous(Private) April 27, 2017 at 5:54 pm #105263Many thanks Trevor. The thing is that always got “7” results no matter if I filter or not. As example, in second field (T. OPERACION) i select “ALQUILER” (got 2 results) but the Results count still is 7 … should be 2.
Maybe that results count must be ajax in some way. Dunno how to do that…Trevor(Private) April 27, 2017 at 6:36 pm #105272Feel free to leave a review if you wish:
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/reviews/#comment
I will close this thread now.
-
AuthorPosts