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 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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks lukaspawlik, It works. I changed the string 'ai1ec-event' in my event language translation 'evento' and fix 404 error