• Resolved manjuhari

    (@manjuhari)


    I am having issue with this. I have used ‘Translate Only Certain Paths’ . I dont want my blog posts to be translated. But unfortunately my blog posts are getting hreflang tags when the SEO Audit bot crawls. How do I fix this? I tried the code snippet below in functions.php which did not help.

    add_filter( ‘trp_register_post_type_for_translation’, ‘trp_exclude_posts_from_translation’, 10, 2 );

    function trp_exclude_posts_from_translation( $register, $post_type ) {
    if ( $post_type === ‘post’ ) {
    return false; // exclude blog posts
    }
    return $register;
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Anca

    (@ancavictoria)

    Hello,

    To get a clear report, I recommend checking Google Search Console at https://search.google.com/search-console/welcome rather than a third-party tool, which may provide incorrect information or false positives.

    Hreflang tags should not appear on pages that are excluded from translation.

    I inspected the mentioned page: https://dev.annata.net/gudrun-olafsdottir-datas-integrity-ai-superpower-in-a365/ and can confirm that no hreflang tags appear on this excluded page.

    In this case, my suggestion is to check the referring page – you may have recently excluded this page and the information hasn’t been updated correctly yet, but the issue should resolve itself over time.

    Kind regards,

    Anca

    • This reply was modified 2 weeks, 6 days ago by Anca.
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.