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)