How to change “events” slug & rewrites
December 28, 2021
Changing event slug can be achieved easily via eventon settings.
Under the EventON Event Post Slug field write the slug text you want to appear instead of /events/ Changing this would result in a single event page URL like http://www.awesomesite.com/events/cool-event/
Further Customize Rewrites
You can further customize the event permalink structure with the slug by tapping into the pluggable filter like below. — This code should go in functions.php file in your theme.
More information on rewrite editing can be found in here: https://developer.wordpress.org/reference/functions/register_post_type/#rewrite
$array['with_front'] = false; //Should the permalink structure be prepended with the front base
$array['pages'] = true; //Should the permalink structure provide for pagination
$array['feeds'] = true; //Should a feed permalink structure be built for this post type
Above example show several options you can pass into rewrite of slug in the event permalinks.
with_front — option allow you to either remove any front URL parameters added for other pages be removed from event permalink.