Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Suppression of the @language in Categories titles #383

Closed
MadeByKarl opened this Issue Nov 6, 2013 · 0 comments

Comments

Projects
None yet
1 participant

Hi,

When your WP in translated and you use categories, if you go through several category names that are the same in both languages (Europe is the same in French and English, same for France, etc) WP put a @language after the name.

On a category's archive page, you don't want this and WP removes it for you so you have Europe Archives | Your website. But when wordpress-seo is on, it somehow bypass this and you get Europe @en Archives | Your website.

Here is the patch I've put in my functions.php but I think you should put it in class-frontend.php, "title" method right before the return (somewhere near line 440).

add_filter('wp_title', 'remove_lang_filter', 20, 2);
function remove_lang_filter($title, $sep){
return str_replace(' @'.ICL_LANGUAGE_CODE, '', $title);
}

Cheers!

@jdevalk jdevalk closed this in 11fbf52 Dec 16, 2013

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