I have a CPT ('Businesses') with an associated taxonomy ('Business Category'). There are 152 Businesses listed in total.
I have created a view that lists Businesses using a parametric search filter that filters by the associated Business Category.
When the page is first loaded, the default_label for the wpv-control-post-taxonomy is 'Select a Category', which lists all 152 businesses.
I would like to hide the list of businesses until a Business Category is selected from the dropdown list.
I would therefore like to be able to create a conditional that uses the total number of Businesses (unfiltered) and only displays the results if the number is less than 'ALL' or if the the default_label is selected. Is this possible?
I have managed to do this by hard-coding the number (152) but obviously this is going to be a dynamic number:
Thank you Minesh. However, this doesn't seem to help.
I think that all I need is to be able to create a custom shortcode that returns the total number businesses that I can then use in the conditional statement - for example: