Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Suppression of the @language in Categories titles #383

Closed
MadeByKarl opened this Issue · 0 comments

1 participant

@MadeByKarl

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.