Forums Forums Search & Filter Pro Get number of results in a form

Viewing 9 posts - 1 through 9 (of 9 total)
  • Anonymous
    #224163

    Hi there,

    How could I write a custom function to get the number of results shown in a particular form?

    many thanks
    Andrew

    Trevor
    #224207
    This reply has been marked as private.
    Anonymous
    #224226

    Hi Trevor,

    Sorry about that, I have renewed the license just now. I only want to show the number of results displayed.

    I would like to display this on top of the page, this is why I think a function is what I need, because then I can place it wherever I want on the page.

    Trevor
    #224228

    What Display Results Method does your form use?

    Anonymous
    #224230

    I am using the two shortcodes like this on each page. Each page has a different ID and I have 10 different pages.

    [searchandfilter id=”11443″]
    [searchandfilter id=”11443″ show=”results”]

    Inside the settings, loading results with AJAX (all checked). Also I only return results which match specific post meta data.

    for example:
    br_category = “Style”

    I suppose it might just be easier for the function to go through the custom post type “Brands” and count all the posts which have the custom field: br_category = “Style” ?

    Trevor
    #224232

    In the standard results.php template that the shortcode method uses, it shows the results count. Is this what you meant that you want, or have you deleted that part of the template PHP?

    Anonymous
    #224349

    yes that’s what I want but I also deleted it! also I would like this number to be shown on the top of the page.. before the search form..

    Anonymous
    #224377

    no worries trevor, I have figured this out with a custom function 🙂

    Trevor
    #224385

    Thanks for letting me know. I will close this thread for now.

Viewing 9 posts - 1 through 9 (of 9 total)