Skip to content

Instantly share code, notes, and snippets.

@jdevalk
Last active December 19, 2015 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdevalk/5917169 to your computer and use it in GitHub Desktop.
Save jdevalk/5917169 to your computer and use it in GitHub Desktop.
Add this to your functions.php to make WP SEO work with qTranslate, per this thread: http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-compatibility-with-qtranslate?replies=24#post-3797599
<?php
/**
* Enable qTranslate for WordPress 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 );
@ahakem
Copy link

ahakem commented Oct 7, 2013

I can't see any change in dashboard after adding this code, I expect the I will see multiple input for each language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment