closed as off-topic by Nathan Johnson, rudtek, Andy Macaulay-Brook, bosco, Rick Hellewell Mar 30 at 0:21
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – Nathan Johnson, rudtek, Andy Macaulay-Brook, bosco, Rick Hellewell
This is probably due to empty lines inside your custom php files. Try checking every php file you edited for empty lines after the
?> closing tag: the tag should be the last character of any file.
I look for empty lines inside every PHP files but I didn't find any but at last, I found the solution the error was due to a function which I declare in my functions.php file, the function was register_sidebar(); but I was not using it in my theme anywhere. When I removed this function in my functions.php file then sitemap.xml of my website working correctly