Manage Custom Taxonomy

Add Unlimit Custom taxonomy for event and display in Search form.

1: Choose number type

Events >> Settings >> General >> Total Custom Taxonomy: Insert the number of tanomomy

If you don't want to use Custom Taxonomy, you can insert 0.

After choosing total custom taxonomy, you will see it in admin

Menu custom taxonomy

2: Change Name, Slug for new Type

Open functions.php file in meup child theme and insert code bellow

add_filter( 'register_taxonomy_el_1', function ($params){ return array( 'slug' => 'taxo1', 'name' => esc_html( 'Taxonomy 1', 'meup' ) ); } );
add_filter( 'register_taxonomy_el_2', function ($params){ return array( 'slug' => 'taxo2', 'name' => esc_html( 'Taxonomy 2', 'meup' ) ); } );

You can change taxo1, taxo2, Taxonomy 1, Taxonomy 2 to your value

After adding code, you will see this in admin:

3: Display new Type at frontend

a) Display when creating a new event

Vendor can choose a new type when making a new event

b) Display in Search Form

4: Require entering a custom taxonomy when creating an event.

You can insert a hook or filter into the functions.php file of your child theme

add_filter( 'el_custom_taxonomy_required', function(){ return array( 'elprice', 'eljob' ); } );

Note: elprice, eljob is slug of custom taxonomy. You can replace it to your slug.

Last updated

Was this helpful?