Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] Compatibility with qTranslate

  • Resolved jstearn

    (@jstearn)


    is there compatibility with qTranslate? Right now, I see both the English and the translated text in the browser title (except for the homepage, which displays translated text when it is supposed to and English text when it is supposed to). I have no entered any text in the SEO Title field since I can only enter one language, but was hoping the plugin would pick up off of qTranslate and display the correct title in the browser

    If there is a workaround or suggestion for one, I’m not opposed to getting my hands dirty, I am just not sure where I would go about doing it within the plugin code.

    I love this plugin and would like to make it work. There is a lot of SEO opportunity in non-English language sites.

    Thanks in advance.

    http://wordpress.org/extend/plugins/wordpress-seo/

Viewing 8 replies - 31 through 38 (of 38 total)
  • Put this in theme functions.php

    if(defined("QT_SUPPORTED_WP_VERSION")) {
    	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);
    }

    I am struggling with an ununderstandable issue for few days.
    I applied the suggested filters in functions.php. This works perfectly for the page title and focus key words. Nevetheless when it comes to the Meta description all my quicktags ([:en] for example), are automatically removed by wordpress once I try to update the page. Once the page is updated, all my tags have disappeared.
    The most crazy thing is that this works properly on my dev website, but does not work on my sandbox neither on the online version.
    I have spent hours trying to figure out why, what the difference may be, but cannot find anything.
    I would greatly appreciate any help !

    @mojo38: Have exactly the same issue. You found already any solution ?

    Same for me

    As a work around, try this:
    1) update you page
    2) edit meta description directly in the database

    I know this is quite nasty, but for the time being it may be a quick and dirty solution…

    Didn’t find any solution as far. What drives me crazy is as I said, this works on the dev version of my website, but not on the sandbox, neither on the production version.
    What I am doing now is re-exprting the dev version to replace my sand box, then my prod versions, since dev version works. But in spite having spent hours to check what differences I may have between the dev version and the two other ones, I don’t have a clue aboute what the issue could be.

    Will try your work around Solala, it is a good idea.
    Even if it works it would still be better finding a solution to the issue, as this solution definitely makes qtranslate less user friendly, which was still a main advantage compared to other solutions.

    Hey my dev just find the solution so you have to add :
    // Enable qTranslate for WordPress SEO
    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);

    in your function.php,
    then to provide wordpress from strippping the shortcode you have to go to:
    Plugins => WordPress-seo => js => wp-seo-metabox.js and to comment the lign 7. (str = str.replace(/\[(.+?)\](.+?\[\/\\1\])?/g, ”);) then it should work

Viewing 8 replies - 31 through 38 (of 38 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Compatibility with qTranslate’ is closed to new replies.