[Plugin: WordPress SEO by Yoast] & multilanguage sites (1 post)

  1. nick_nielsen
    Posted 5 years ago #

    I have a bilingual site and I use the language switcher plugin to enable me to provide posts titles etc. in both languages.

    Typically you use short codes to write your different languages like this
    [lang_en]my text[\lang_en][lang_fr]mon texte[\lang_fr]. There is is a filter that you can insert into templates that ensures the correct language is output.

    I noticed after installing Yoast (which is the easiest SEO plugin I've seen- I've given up on the others as too complicated) that titles were outputting the whole text of titles - short code and all.

    the hack I found is to put the language switcher filter into class-frontend.php - at line 216 thus

    I don't know if this is the best solution, or the most elegant - is there a way I can put this code somewhere so I don't have to worry when you update the plugin ?

Topic Closed

This topic has been closed to new replies.

About this Topic