Why doesn’t the Yoast SEO plugin work with qTranslate?

Last update: 13 July, 2018

NOTE: qTranslate is no longer available in the WordPress plugin directory. If you are using qTranslate X, you may try installing this plugin as recommended by the developer of qTranslate X. Our recommendation would be to look for another multilingual plugin.

What if I'm using the original qTranslate?

As far as we know, this plugin has not been updated or maintained for newer WordPress version. And when it was being maintained, we did not support using this plugin in any way as we're not particularly fans of the way qTranslate interacts with WordPress.

To make our Yoast SEO plugin work with the original qTranslate, you should add the following code to your theme's functions.php:

<br />
* Enable qTranslate for Yoast SEO
* * @param string $text The string to translate
* * @return string
function qtranslate_filter( $text ) { return __( $text ); }
  add_filter( 'wpseo_title', 'qtranslate_filter', 10, 1 );
  add_filter( 'wpseo_metadesc', 'qtranslate_filter', 10, 1 );
  add_filter( 'wpseo_metakey', 'qtranslate_filter', 10, 1 );
  add_filter( 'wpseo_opengraph_title', 'qtranslate_filter', 10, 1 );

Was this article helpful? ·