Support

Home Forums Event Espresso Premium How to change category base slug? Reply To: How to change category base slug?

Reply To: How to change category base slug?

Author Replies
Josh # Posted on May 8, 2018 at 11:04 am

Hi,

Your version isn’t valid because my_custom_event_category_basename is actually the function name. The function name can be whatever you want to call it, but it must be unique (or PHP will throw a fatal error). Also, the filter callback must match the function name.

In other words: If you want to change the function name to something like “yaegerhunter_custom_category_function”, your code will be:

add_filter( 
    'FHEE__EventEspresso_core_domain_entities_custom_post_types_TaxonomyDefinitions__getTaxonomies',
    'yaegerhunter_custom_category_function', 
    10 
);
function yaegerhunter_custom_category_function( array $taxonomies ) {
    $taxonomies['espresso_event_categories']['args']['rewrite']['slug'] = 'ee4-group';
    return $taxonomies;
}
Do NOT follow this link or you will be banned from the site!