Skip to content

Instantly share code, notes, and snippets.

@kylephillips
Created March 7, 2016 15:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylephillips/616d0c8bf1c8bff91534 to your computer and use it in GitHub Desktop.
Save kylephillips/616d0c8bf1c8bff91534 to your computer and use it in GitHub Desktop.
Include category filters in location search forms.
/**
* To Enable Category filtering for the location post type
* 1) Register categories for the post type
* 2) Include "category" in the "taxonomies" shortcode option
*/
function add_categories_to_locations()
{
register_taxonomy_for_object_type( 'category', 'property' );
}
add_action( 'init', 'add_categories_to_locations' );
[wp_simple_locator taxonomies="category"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment