Skip Navigation

[Resolved] Show Results count in Search button (while having form and results seperately)

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 4 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1651533

You can use the "[wpv-found-count]" shortcode to show the results count within the search button like this:

[wpv-filter-submit output="bootstrap" name="Show all [wpv-found-count] results"]

This though does not work when having the form separately from the results page as stated here: https://toolset.com/forums/topic/show-wpv-found-count-in-the-search-form/#post-1651489

The available options update properly when changing the filters so why does the results shortcode not render in this case? I mean, I could put it all on one page and have an empty result template make the shortcode render but then I would lose the link to the external results page (that has all the url parameters set up properly).

Is there a workaround, with an empty template. But how could I create the link to the results page with all the url filter parameters?

Thanks in advance.

#1651861

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Konstantin,

Thank you for getting in touch.

Unfortunately there isn't a workaround for this. The [wpv-found-count] shortcode requires that the results be on the same page.

If the results are not there then the [wpv-found-count] shortcode has no way of telling how many items are being displayed.

Not much we can do about this since this is how it works by design.

The results section generates a separate div that the [wpv-found-count] will detect and gather the number of items found. When the Filter is separated from the view, essentially this div is not present on the page.

Thanks,
Shane