Skip to content

Instantly share code, notes, and snippets.

@lukaspawlik
Last active January 24, 2017 19:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukaspawlik/64872268a38ef5ef93c2 to your computer and use it in GitHub Desktop.
Save lukaspawlik/64872268a38ef5ef93c2 to your computer and use it in GitHub Desktop.
How to change event detail URI partice /event/ to /ai1ec-event/
/*
Please paste it to your WordPress theme functions.php
DON'T FORGET TO SAVE PERMALINKS SETTINGS.
*/
function __ai1ec_custom_slug_name( $translations, $text, $domain ) {
if (
AI1EC_PLUGIN_NAME !== $domain ||
'event' !== $text
) {
return $translations;
}
return 'ai1ec-event';
}
add_filter( 'gettext', '__ai1ec_custom_slug_name', 10, 3 );
@vldancingmarine
Copy link

vldancingmarine commented Nov 2, 2016

The archive page and the parent for all events is "/event". How do I change the archive page to be "/archive" and change the detail event pages to be under my main events feed page "/events"?

@Baoh14
Copy link

Baoh14 commented Nov 3, 2016

Hi, I have same issue and I try this code but when I clik on Learn more on single event he give me 404 error page
where is the permalink setting you talk about?

Tyy

@ptranchida
Copy link

Thanks lukaspawlik, It works. I changed the string 'ai1ec-event' in my event language translation 'evento' and fix 404 error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment