Shop page in sitemap two times

#1022792
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    This happens if you assign a WordPress page as your shop page (archive of your products).

    However, if you want to remove it from your product sitemap, you can use this filter on your site:

    add_filter( 'rank_math/sitemap/post_type_archive_link', function( $archive_url, $post_type ){
        if($post_type == 'product') { //change to match the actual post type
            return false;
        }
        return $archive_url;
    }, 10, 2 );

    Here’s how you can add a filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Shop page in sitemap two times’ is closed to new replies.