Hook to return Modified Filter Name
- prakashreddy.imduriParticipant1 year, 1 month ago #35300
Hi, Can you help me with some filter to modify the filter title, based on some condition.. I will add the condition, need the filter to modify the Filter name. As I am planning to use same filter, but name has to be different on some pages.
wpsolrKeymaster1 year, 1 month ago #35302WPSOLR_Events::WPSOLR_FILTER_UPDATE_FACETS_DATA, which contains all the content sent to the .twig rendering template.
Or WPSOLR_Events::WPSOLR_FILTER_SEARCH_PAGE_FACET_NAME, with an example in /plugins/wpsolr-pro/wpsolr-pro/wpsolr/pro/extensions/acf/class-wpsolr-plugin-acf.php
prakashreddy.imduriParticipant1 year, 1 month ago #35303Can you provide an example, got this filter :
add_filter( WPSOLR_Events::WPSOLR_FILTER_SEARCH_PAGE_FACET_NAME, [ $this, 'get_field_label', ], 10, 1 );
I am looking to rename a filter with name Geography to Country…
prakashreddy.imduriParticipant1 year, 1 month ago #35312Thank you, working fine.
prakashreddy.imduriParticipant1 year, 1 month ago #35321Just one more thing, Any option to hide facets on some pages, if hiding not possible, any filter to add custom class to facets ?
prakashreddy.imduriParticipant1 year, 1 month ago #35359Thank you, it worked
prakashreddy.imduriParticipant1 year, 1 month ago #35360Is it possible to hide the taxonomies inside the filters too ? Suppose if expand the Filter A , we have 10 taxonomies, can we remove one from them ? Any filter in use in the code ?
You must be logged in to reply to this topic.