Viewing 15 replies - 16 through 30 (of 34 total)
  • Thread Starter redlinepc

    (@redlinepc)

    My personal opinion: Dont use Qtranslate, it gives too much problems… its better to have 1 wordpress instalation for each language…

    radarred: Please open a new thread for that subject – or search for it.

    redlinepc: 1 installation for each language gives problems too – for example I need to keep tracking of 3 different booking systems then. Not to mention the tripled administrative work when editing stuff.

    Bottom line is that I just need a small fix like the one mentioned here to work with the current release of WordPress SEO by Yoast.

    JKNN:
    My fix you have linked to is not working anymore with the latest Yoast version.

    However:
    The trick of the whole hack was not to use the mentioned meta tags of Yoast, but the ones from Qtanslate meta plugin.
    Try to leave the respective fields of Yoast blank.
    It still works for me, I’ve just double checked it.

    My versions:
    SEO Yoast: 1.2.5
    qTransl Meta: 1.0.2

    Hello solala. Thank you for the answer. I am, however, going to need some more help to fix this.

    I have just installed WordPress SEO by Yoast, everything is default. When I leave the fields blank on a page in wordpress at the bottom under WordPress SEO and then enter the wanted titles in qtranslate meta, it does not work. Tested on this page: http://brusaaudlejning.dk/huset/. I am pretty sure that some “title template” from yoast seo overrules.

    Are there other fields in WordPress SEO by Yoast that I have to leave blank to make the qtranslate meta overrule it for titles and descriptions?

    radarred:
    I am successfully using:
    – Yoast SEO
    – qTransl Meta
    – WordPress shop germany WPSG

    No problems…

    I have tried your method without success 🙁 I have settings shown below for pages. It works fine with the wordpress seo box not showing on pages. Then I have entered seperate titles for two pages in qTranslate META box on bottom of two pages, but still.. some template from wordpress seo overrules as well as I can see. Tested on the following pages: http://brusaaudlejning.dk/huset and http://brusaaudlejning.dk/en/rideferie/

    View post on imgur.com

    What can I do, you think? I am desperate to fix this 🙁

    Guys try this in your functions.php with the latest version of WordPress SEO

    // 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);

    sfradel, I love you!

    Yes, I can confirm that sfradel’s solution works really well! Thank you!

    Naturally, if you enter multiple languages in Yoast fields that are limited by number of characters, you will get some warnings. But just ignore them. The limits are not applied when you save the data, so the full strings will be in the source code anyway (as long as each language stays under the limit)

    Example usage:
    Meta Description:
    <!--:en-->Cross-platform mobile apps and IT consulting. Mobility solutions.<!--:--><!--:sv-->Mobilappar och IT-konsult. Mobila lösningar. kdfjhskdfjhksfhskfjhskjfhksjfhdsfsdfssdffdssdj 1234567890<!--:-->

    You get the following warning in the SEO admin:

    The meta description will be limited to 156 chars, -11 chars left.

    However, the full text strings are printed on the web site in each language.

    sfradel solution works for wpseo_metadesc
    but not for wpseo_title
    wp 3.4.1 WordPress SEO 1.2.7

    p.s.: it looks like wpseo_title is already striptagged before suggested filter is applied

    KOKON in the admin part the metabox uses JavaScript for the title parsing but in my theme it works ok

    here is the place your filter is applied:
    ./wp-content/plugins/wordpress-seo/frontend/class-frontend.php

    function title( $title, $sepinput = '-', $seplocation = '' ) {
    ..
    ..
        //var_dump($title);
        return esc_html( strip_tags( stripslashes( apply_filters('wpseo_title', $title ) ) ) );
    }

    my var_dump outputs $title with already stripped qTranslate tags

    Thanks sfradel for your fix! Is it normal that the Snippet Preview in the admin doesn’t seem to take into account the qtranslate shortcode?

    Thanks in advance!

    Τhe Snippet Preview uses javascript for the parsing of the title and description. So the shortcode is not taken into account, this needs modification of the plugin core wp-seo-metabox.js file.

    I created a modified version of the wp-seo-metabox.js give a look if you want.

Viewing 15 replies - 16 through 30 (of 34 total)
  • The topic ‘[Plugin: WordPress SEO] Yoast SEO and Qtranslate’ is closed to new replies.