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

Last update: 03 October, 2016

NOTE: qTranslate is no longer available in the WordPress plugin directory. If you are using qTranslate X, please install and activate this plugin as recommended by the developer of qTranslate X.

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:

/**
* 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? ·