slugs does not include language folder
-
We have the same setup for all our customers, use a folder for language, default language hidden in URL and default home page for language use only language code.
We are experiencing some problems :
1/ On menus translated pages permalinks are not including the language prefix
2/ In some cases a loop of redirect on the language page
3/ Its seems the following snippet is not taking into account the language preffix
if ( function_exists(‘icl_object_id’) ) {
$page = get_page_by_path( $page_id );
$pageId = $page ? $page->ID : null;
if ($pageId != null) {
$translated_id = icl_object_id( $pageId, ‘page’ );
if ( $translated_id ) {
$page = get_page($translated_id);
if ( $page ) {
return get_permalink( $page->ID ); // $page->post_name
}
}
}
}We thing this is happening since our last update
Our setup is:
– Multi site wordpress
– Wp-Ultimo and sunrise to manage custom domains
– Polylang form languageThe page I need help with: [log in to see the link]
- The topic ‘slugs does not include language folder’ is closed to new replies.