Support Ticket

#850540
  • Resolved Luc NAROLLES
    Rank Math free

    Hello
    Why can’t I access the contents of my old support tickets?
    I was looking for your advice regarding excluding categories from the sitemap because “excluding by taxonomy” doesn’t seem to work
    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    We apologize for the issue you are facing with accessing the contents of your old support tickets. It can be frustrating not to find the information you need.

    Regarding your question about excluding categories from the sitemap, if "excluding by taxonomy" isn’t working as expected, we recommend checking for any plugin or theme conflicts that might be affecting this functionality. You can perform a health check using the Health Check & Troubleshooting plugin to identify any conflicts.

    If you continue to experience issues, please reply to this ticket with more details, and a human agent from the Rank Math Support team will assist you further.

    Thank you for raising this concern, and we look forward to helping you resolve it!

    Sources:
    How To Effectively & Efficiently Get Support from Rank Math (Support Tickets) » Rank Math

    Hello,

    Thank you for contacting support.

    You have tickets opened on your account under the PRO section of the forums but since you no longer have an active PRO subscription you only have access to the Free section of the forums.

    As for your questions, this is the default behavior of the plugin as excluding a taxonomy won’t exclude all the posts from said taxonomy automatically.

    To achieve that you can edit the following code snippet with the name of the category:

    
    add_filter( 'rank_math/sitemap/entry', function( $url, $type, $object ) {
    
        if ( $type === 'post' ) //change your post type here
        {
    
            $categories = get_the_terms( $object->ID, 'category' );
    
            // Replace 'category-slug-1' with your actual category slugs
            $exclude_categories = array( 'category-slug-1');
    
            if ( is_array( $categories ) && array_intersect( $exclude_categories, wp_list_pluck( $categories, 'slug' ) ) ) {
                return false;
            }
        }
        return $url;
    }, 10, 3 );
    

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

    Once done, please flush your sitemap cache by following these steps:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

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

    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 2 replies - 1 through 2 (of 2 total)

The ticket ‘Support Ticket’ is closed to new replies.