Display Search Result Count

Forums › Forums › Search & Filter Pro › Display Search Result Count

Viewing 6 posts – 1 through 6 (of 6 total)
  • Anonymous
    #165445

    I think this is something simple I am just missing, but how do I display the search results count (Showing x of xx posts)?

    Trevor
    #165453

    Which Display Results Method are you using?

    Anonymous
    #165457

    As an archive. I am happy to do this in my template manually (I’m already accessing the search data to change page titles, etc.) I just didn’t see a method for this in the documentation.

    Trevor
    #165459

    It would depend on how you template and query in your theme is constructed, but the standard WordPress Codex code to display the number of results looks like this:

    <?php echo $query->found_posts; ?>

    but then you would need to find (do a Google search) for how to find the total number of posts (of the post types that you are searching).

    Anonymous
    #165461

    Ah, okay. I thought the plugin might have a specific action hook or function to do this.

    Trevor
    #165463

    Ah, sorry, no. At, at least in the current version. For the future it might be worth raising this as a feature request?

Viewing 6 posts – 1 through 6 (of 6 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.