My site uses Ticket Plus and the shortcode [ticketcount] to determine the remaining tickets.
I would like to add a boolean switch to my View (legacy) to allow the viewer to filter by "Show Sold Out" true/false that hids any items where the [ticketcount] <=0!
- Where above shortcode will display the Count: if [ticketcount] shortcode is greater than 0.
- please note that you will have to register the "ticketcount" shortcode name at:
=> Toolset -> Settings page and click the Front-end Content tab. There, simply add your shortcode to the Third-party shortcode arguments section.
Minesh, that is the code to add a conditional output and is not a "filter".
I am looking to add a filter to the view that only displays items returned in the search results that have [ticketcount] > 0. Ald adds a checkbox on the UX to allow viewers to toggle the visibility of these items.
Basically - you can add the frontend filter for custom fields, taxonomies. There is no way to add the frontend filter for the shortcode.
Can you please share problem URL where you added the said view and admin access details and let me review the current setup and check what possible workaround is possible and I can offer.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Can you provide an example of the code that I would need to write to add a custom filter using the shortcode and linked to a UI element In the filters?
In general -you can add a "wpv_filter_query" hook and then try to add a custom query within it to get all IDs of posts where ticketcount is greater then 0 and later use the post__in argument to hook in the found post IDs that has ticket count greater than 0.