Last active
November 30, 2018 03:58
-
-
Save Fitoussi/da198dc313db2a323c2a to your computer and use it in GitHub Desktop.
GEO my WP Modify Taxonomy Drop-down Options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function gmw_modify_search_form_taxonomy_args( $args, $taxonomy, $gmw ) { | |
| // Limit the fuction to a specific form using it's ID. | |
| if ( 1 !== $gmw['ID'] ) { | |
| return $args; | |
| } | |
| // limit the function to a specific taxonmoy. | |
| if ( "category" !== $taxonomy->name ) { | |
| return $args; | |
| } | |
| //modify the show_option_all of the taxonomy. | |
| $args['show_option_all'] = "All Categories"; | |
| //return the modifyed args | |
| return $args; | |
| } | |
| add_filter( 'gmw_search_form_dropdown_taxonomy_args', 'gmw_modify_search_form_taxonomy_args', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment