Support Forums

Hey there, it looks like you've been redirected from designsandcode.com - as you can see we have a new home - read more

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Results count… can't make it work

Tagged: ,

Viewing 9 posts - 11 through 19 (of 19 total)
  • Javier Riveros
    #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? YES

    I can give you admin credentials if you want. Many thanks!

    I think all is working but that results counter…

    Thanks again in advance!

    Trevor Moderator
    #105031
    This reply has been marked as private.
    Javier Riveros
    #105200
    This reply has been marked as private.
    Trevor Moderator
    #105232

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

    Javier Riveros
    #105263

    Many 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…

    Javier Riveros
    #105265

    Or maybe I can enable “use background processes” but don’t understand how that can effect me. If it is good for the search and for results count … in that case i don’t mind to have that option enabled…

    Trevor Moderator
    #105268

    Try switching off Ajax and it will then re-load the page instead. If the count is then correct, then all that is happening is that Ajax is not refreshing the count. That could be because the code is not inside the Ajax Container in the template.

    Javier Riveros
    #105270

    Oh my gosh… i put your fix inside the ajax container and now it is working perfect.
    Thanks for guide me in the right direction and the fixes. I’ll be bak if got any other issue.

    You can close this ticket now. Thanks a lot!

    Trevor Moderator
    #105272

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

Viewing 9 posts - 11 through 19 (of 19 total)

The topic ‘Results count… can't make it work’ is closed to new replies.