Can I change the contents of a description meta tag generated by Yoast in a Word

  • Unknown's avatar

    Essentially I have the Yoast plugin handling my SEO related things. The main one giving problems is the description meta tag.

    The site is bilingual and I would like the description meta tag to be translated as well. Yoast currently does not provide that option, unless I get another plugin which I do not want to get into.

    As it stands, I am told that I can insert the description meta tag through the functions.php using add_action. This unfortunately does not work as it only adds another description meta tag.

    Currently my code looks like this:

    function insert_meta_tag_in_head () {
        echo '<meta name="description" content="My New content" />';
    }
    add_action('wp_head', 'insert_meta_tag_in_head', 1);

    So basically this just gives me a second description meta tag. I have also seen in other threads, that if I want to replace a tag, I should use the do_action function. Which I call as follows:

    do_action('wp_head', 'insert_meta_tag_in_head');

    This however does nothing. What am I doing wrong? How can I change the contents of the description tag given to me through Yoast?

  • Unknown's avatar

    Hi there, what is the URL of your website?

  • Unknown's avatar

    It is an unreleased client’s website that I am not sure they would like me posting it here. (I know it sounds silly, sorry!) Do you absolutely need it?

  • Unknown's avatar

    It’s important to verify that your hosted with WordPress.com, and I suspect that you’re not. You don’t need to post it here though!

    Please type it into https://www.whoishostingthis.com/ and if it says Automattic, let us know.

    In the case that it is not, it would that your website uses the self-hosted version of WordPress rather than WordPress.com, which is what this forum is designed to help with. Note the difference here: https://en.support.wordpress.com/com-vs-org/

    Should this be the case, you may be able to find help here: https://wordpress.org/support/ or alternatively contact your hosting provider.

  • Unknown's avatar

    Note: Another way of checking is that on WordPress.com, you would need the Business Plan to use the Yoast Plugin.

  • Unknown's avatar

    Ahh I see!
    I’m sorry I didn’t realize this. Indeed it is not hosted with wordpress.com.
    Thank you for the info, I will redirect this question to wordpress.org.

  • Unknown's avatar

    Best of luck finding a solution. :)

  • The topic ‘Can I change the contents of a description meta tag generated by Yoast in a Word’ is closed to new replies.