• Bakke

    (@bakke)


    Hi,

    I am using qTranslate on a page, along with WordPress SEO. The problem is that I have to set every SEO title and meta description manually or it will show all the translations in one (in search engines). I.e. the title becomes “KontaktierenKontaktContact”.

    I have created a filter that works for wp_title etc. But this does not work for the title and description presented to search engines.

    function qtranslate_filter( $text ){
    	return __( $text, 'qtranslate' );
    }
    add_filter( 'wpseo_title', 'qtranslate_filter', 10, 1 );
    add_filter( 'wpseo_metadesc', 'qtranslate_filter', 10, 1 );
    add_filter( 'wpseo_metakey', 'qtranslate_filter', 10, 1 );

    I need to be able to filter the replacement values in wpseo_replace_vars(), before the language tags are stripped away.

    Thanks!

    https://www.ads-software.com/plugins/wordpress-seo/

Viewing 5 replies - 1 through 5 (of 5 total)
  • taniav

    (@taniav)

    I would also like to know how to overcome this problem.

    Greg007

    (@greg007)

    There is an answer on YOAST FAQ page ,
    but it is not working for me.

    I am getting some error, let me know if you succeed to do this.
    I add this code to functions.php at my theme folder, and to functions.php in wordpress install folder, but both times I get error.

    Let me know your experience please.

    Greg007

    (@greg007)

    P.S.
    just installed all-in-on-seo-pack,
    it’s working “out of the box”… ??

    taniav

    (@taniav)

    Hi Greg007,

    I have tried solution from Yoast (throught the link you gave above), but it’s not working for me too. Didn’t get error, but nothing is change…

    I prefer to not change plugin as I love feature in this plugin (breadcrumb etc).

    ======
    Is there someone out there who knows how to make it works with qtranslate plugin?

    [Edit]

    It’s works!

    I’ve added this code in my functions.phh, then I insert in title e description my title or description with prefix language ([:it], [:en], ecc…)

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘qTranslate support’ is closed to new replies.