Noindex page added in sitemap

#345604
  • Resolved Jorge Sáez
    Rank Math free

    Hi! I am using Rank Math in a SEO client but I have a problem

    My client uses custom post type in Genesis, and I want to generate a sitemap of a type of content

    How can we fix this?

    Many thanks

Viewing 3 replies - 16 through 18 (of 18 total)
  • Hello,

    Please remove that filter and instead use the following filter which should help remove the archive of that post type:

    
    add_filter( 'rank_math/sitemap/post_type_archive_link', function( $archive_url, $post_type ){
        if($post_type == 'tutorial') {
            return false;
        }
        return $archive_url;
    }, 10, 2 );
    

    After applying this filter don’t forget to flush the sitemap again following this tutorial: https://i.rankmath.com/pipRDp

    Hope this helps solve your issues.

    Don’t hesitate to get in touch if you have any other questions.

    Jorge Sáez
    Rank Math free

    Hello Miguel,

    It has worked! Many thanks to all the rank math team for the great support.

    Hello,

    Glad that helped.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

Viewing 3 replies - 16 through 18 (of 18 total)

The ticket ‘Noindex page added in sitemap’ is closed to new replies.