How can i exclude page from xml sitemap

#27714
Viewing 1 replies (of 1 total)
  • Hi Roman,

    Thanks for getting in touch with us.

    I can recommend that you use the following filter to check if you are on the paginated gallery page and change the robots meta. You can have the parent set to noindex and then index the paginated pages to add them to the sitemap:

    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	return $robots;
    });

    I hope this info helps.

    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 ‘How can i exclude page from xml sitemap’ is closed to new replies.