Other Documentations
How to change “events” slug & rewrites
September 15, 2023
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
1 2 3 4 5 6 7 |
add_filter('eventon_event_slug','my_function',10,1); function my_function($array){ $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 return $array; } |
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.
Did this article help you? If not, send us a ticket via helpdesk