Last active
January 24, 2017 19:40
-
-
Save lukaspawlik/64872268a38ef5ef93c2 to your computer and use it in GitHub Desktop.
How to change event detail URI partice /event/ to /ai1ec-event/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 ); |
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
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
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"?