gmw_search_form_dropdown_taxonomy_args

This filter allows you to modify the arguments of each taxonomy before it is generated in the search form. The arguments then pass to the get_terms() function which retrieves the taxonomy terms.

You can use this filter to include or exclude terms, modify the default label, modify the terms order and more.

Usage

add_filter( 'gmw_search_form_dropdown_taxonomy_args' , 'your_function_name', 50, 3 );

Parameters

  • $args ( array ) - the array of arguments to pass to the function.

  • $taxonomy ( object ) - the object of the taxonomy being modified.
  • $gmw ( array ) - GEO my WP form.

Examples

In this example, we modify the default "All categories" label of the "category" taxonomy in GEO my WP form with ID 1

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

The filter is located in GMW_PT_Search_Form_Helper::get_taxonomy() in geo-my-wp/plugins/posts-locator/includes/gmw-posts-locator-search-form-template-functions.php

Since

GEO my WP version 3.0.