Hi
I have a toolset relationship filter on my page. I would like to only show options in this filter if they actually have results.
This is different to the existing option in toolset that dynamically shows options in the list if they have results based on other filters etc, I don't wish to do that due to performance reasons and I don't want to use it on other filters.
I would like to just have this filter have a permanent list but only show results that have any posts for the CPT "offer" that this page searches.
I understand this might be a specific use case, if its not possible do you think I could hire a Toolset contractor that would be able to hook into something to achieve this?
Thanks.
Hello, there is no public filter or shortcode option available for filtering the options in a front-end post relationship filter like this. I think the most practical solution, if the filter options are "known" and fairly constant over time, is to use custom JavaScript to remove any unwanted options from the filters after the View loads. I think a contractor who understands JavaScript would be able to handle that for you. If the filter options aren't predetermined, or are fairly inconsistent over time, it could be more complicated because you would need to use the PHP post relationship APIs to determine the available options programmatically, then inject JavaScript into the page based on those API results. I think a contractor who understands PHP and JavaScript could accomplish this for you.
OK thanks a lot, I will look into this 🙂