Post Sitemap List Problem

#197058
  • Resolved Alp
    Rank Math free

    Hello,

    I have a problem about sitemap. I’m using RankMath Free version and I saw a error on search console.

    Search console error

    Why is this problem occuring ? I have an idea but I’m not sure.

    Sitemap

    There are 21 published posts but sitemap shows 22 and there is 1 line. How can I delete empty line ?

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

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    Please copy the code given below and paste it into your theme’s/child theme’s functions.php file:

    add_filter('rank_math/sitemap/entry', function ($url){
        if (isset($url['loc']) && empty($url['loc'])) {
            return false;
        }    return $url;
    });

    After that flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/xXXhDt

    This should remove the blank line from your sitemap. After making sure that the line has been removed from the sitemap, you can resubmit your sitemap on GSC.

    Hope this helps. Let us know if you need any further assistance.

    Alp
    Rank Math free

    Thanks for reply Jaideep. I tried this solve, but It did not work.

    Ankit
    Rank Math business

    Hello,

    Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Please do take a complete backup of your website before sharing the information with us.

    We really look 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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Post Sitemap List Problem’ is closed to new replies.