• Resolved iamwpuser

    (@iamwpuser)


    I am using polylang, and I have this string from yoast seo plugin <meta property=”og:locale:alternate” content=”ru_RU” /> this is hurts to my site!

    https://developer.yoast.com/features/opengraph/api/changing-og-locale-output/#change-the-oglocale-tag – this blog not giving answer on how to delete og:locale:alternate

    these attempts did not help either

    function remove_locale_and_alternate_presenters( $presenters ) {return array_filter( $presenters, function( $presenter ) {// Удаляем Locale_Presenter и Locale_Alternate_Presenterreturn ! ( $presenter instanceof Yoast\WP\SEO\Presenters\Open_Graph\Locale_Presenter ||$presenter instanceof Yoast\WP\SEO\Presenters\Open_Graph\Locale_Alternate_Presenter );});}add_filter( ‘wpseo_frontend_presenters’, ‘remove_locale_and_alternate_presenters’ );

    ———————-

    function remove_locale_and_alternate_presenters( $presenters ) {return array_filter( $presenters, function( $presenter ) {// Удаляем Locale_Presenter и Locale_Alternate_Presenterreturn ! ( $presenter instanceof Yoast\WP\SEO\Presenters\Open_Graph\Locale_Presenter ||$presenter instanceof Yoast\WP\SEO\Presenters\Open_Graph\Locale_Alternate_Presenter );});}add_filter( ‘wpseo_frontend_presenters’, ‘remove_locale_and_alternate_presenters’ );

    ———————

    function remove_yoast_og_locale_alternate( $presenters ) {return array_filter( $presenters, function( $presenter ) {// Убираем не только Locale_Presenter, но и Locale_Alternate_Presenterif ( $presenter instanceof Yoast\WP\SEO\Presenters\Open_Graph\Locale_Alternate_Presenter ) {return false;}return true;});}add_filter( ‘wpseo_frontend_presenters’, ‘remove_yoast_og_locale_alternate’ );

    • This topic was modified 6 months, 2 weeks ago by iamwpuser.
    • This topic was modified 6 months, 2 weeks ago by iamwpuser.
Viewing 1 replies (of 1 total)
  • Plugin Support Mushrit Shabnam

    (@611shabnam)

    Hi @iamwpuser

    There is no specific filter to remove the og:locale:alternate property at this moment.

    This will require custom code. Unfortunately we can’t offer support on custom code. Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes.

    Feature request:

    Thank you for suggesting a new feature for one of our plugins! You’re not the first to have requested this feature! That means a feature request has been created internally and is under review by our product team.

    What’s next?
    Our product team will assess the feature request and assign a priority level to the report. Our developers work on the highest priority issues first. We cannot give you an estimate of when or if they’ll start working on the request.

    If you have any further information that may affect the prioritization, please feel invited to reply to this forum topic, and we’ll share the information with our product team.

Viewing 1 replies (of 1 total)
  • The topic ‘og:locale:alternate – how to delete’ is closed to new replies.