The plugin uses the taxonomy terms of the selected post type to filter the map
So to add a new filter, you just need to create a new taxonomy for your post type.
This is a standard function of Wordperss, you can do it in several ways:
1 use snippets
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
// Register Custom Taxonomy function custom_taxonomy() { $labels = array( 'name' => _x( 'New custom filter', 'Taxonomy General Name', 'text_domain' ), 'singular_name' => _x( 'New custom filter', 'Taxonomy Singular Name', 'text_domain' ), 'menu_name' => __( 'New custom filter', 'text_domain' ), 'all_items' => __( 'All Items', 'text_domain' ), 'parent_item' => __( 'Parent Item', 'text_domain' ), 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ), 'new_item_name' => __( 'New Item Name', 'text_domain' ), 'add_new_item' => __( 'Add New Item', 'text_domain' ), 'edit_item' => __( 'Edit Item', 'text_domain' ), 'update_item' => __( 'Update Item', 'text_domain' ), 'view_item' => __( 'View Item', 'text_domain' ), 'separate_items_with_commas' => __( 'Separate items with commas', 'text_domain' ), 'add_or_remove_items' => __( 'Add or remove items', 'text_domain' ), 'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ), 'popular_items' => __( 'Popular Items', 'text_domain' ), 'search_items' => __( 'Search Items', 'text_domain' ), 'not_found' => __( 'Not Found', 'text_domain' ), 'no_terms' => __( 'No items', 'text_domain' ), 'items_list' => __( 'Items list', 'text_domain' ), 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, ); register_taxonomy( 'custom_taxonomy_for_filter', array( 'locateanythingmarker' ), $args ); } add_action( 'init', 'custom_taxonomy', 0 ); |
2 via plugin Custom Post Type UI
to use the plugin for post type markers you need to change their visibility type to public
1 2 3 4 5 6 7 8 |
function locateandfilter_edit_custom_post_type_args( $args, $post_type ) { if ( $post_type == "locateanythingmarker" ) { $args['public'] = true; } return $args; } add_filter( 'register_post_type_args', 'locateandfilter_edit_custom_post_type_args', 20, 2 ); |
3 via online generator https://generatewp.com/taxonomy/
you will have a new taxonomy
you can activate it in filters