Forum
Welcome, Guest
Please Login to access forum.
Wordpress Sitemap XML format error (1 viewing) 
Go to bottom
TOPIC: Wordpress Sitemap XML format error
#8281
John Dagelmore
Admin
Posts: 3884
User Offline
Wordpress Sitemap XML format error Karma: 84  
In the case the sitemap XML in Wordpress has an incorrect format due to extra lines at the beginning, add the following code to the functions.php of your time to clean-ip the Wordpress output rendering for the website:

Code:

<?php ob_start(); add_action('shutdown', function() { $final = ''; $levels = ob_get_level(); for ($i = 0; $i < $levels; $i++) { $final .= ob_get_clean(); } echo ltrim($final); }, 0);
 
Logged Logged  
  The administrator has disabled public write access.
Go to top