Enable SEO Settings but remove Open Graph tags

This topic has 6 replies, 2 voices, and was last updated 3 months, 3 weeks ago ago by Andrew Mitchell

  • Avatar: Chris
    Chris
    Participant
    August 23, 2024 at 00:52

    I want to keep the Enable SEO settings on for the Noindex tag for URL feature, however, enabling this causes open graph tags to be inserted into my site, causing duplicates since I am using another plugin for that.

    Is there a way to not have the open graph tags inserted into the code but keep the Enable SEO settings option on so I can keep the noindex tag for URL feature?

    5 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    August 23, 2024 at 13:03

    Hello, Chris,

    Thank you for reaching out to us. In order to provide you with a precise answer to your query, we need to review your SEO plugin. Please provide us with access to your site’s admin panel and FTP, or at the very least, the name of the plugin.

    If you are using the Yoast SEO plugin, you simply need to add the following code to the functions.php file of your child theme:

    // Disable Open Graph tags in Yoast SEO
    add_filter('wpseo_opengraph', '__return_false');

    We appreciate your cooperation and look forward to assisting you further.

    Best Regards,
    8Theme’s Team

    Avatar: Chris
    Chris
    Participant
    August 23, 2024 at 14:13

    Login info provided. I use RankMath as my SEO plugin.

    Please contact administrator
    for this information.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    August 23, 2024 at 15:11

    Thank you for your inquiry and for granting us access.

    To disable the Open Graph tags in Rank Math, please add the following code to the functions.php file of your child theme:

    // Remove Open Graph tags generated by Rank Math
    add_action('wp_head', function() {
        // Remove Open Graph tags from the header
        remove_action('wp_head', 'rank_math_opengraph_meta', 10);
    }, 1);

    Should you require any further assistance, please do not hesitate to contact us.

    Best Regards,
    The 8Theme Team

    Avatar: Chris
    Chris
    Participant
    August 23, 2024 at 15:36

    Thank you for this, is there also a way to do the opposite?

    Have the XStore setting on so I can use the noindex tag for URL feature, but not use the XStore Open Graph meta?

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    August 26, 2024 at 13:57

    Hello, Chris,

    Unfortunately, the functionality you are inquiring about is currently unavailable. However, we encourage you to propose this feature on our task board at https://www.8theme.com/taskboard/. Should your suggestion garner the necessary support through votes, we will consider implementing it.

    Thank you for your understanding and contribution.

    Best Regards,
    The 8Theme Team

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.