Forums

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

  1. nick_nielsen
    Member
    Posted 10 months 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
    $title=apply_filters('the_title',$title);

    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 ?

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 10 months ago by nick_nielsen
  • This topic is not resolved
  • WordPress version: 3.1.4