• Resolved justanotherdev

    (@justanotherdev)


    I have been attempting to add a custom sitemap I am generating on the fly with PHP, to Yoast’s generated sitemap. However, without much luck so far. Found the following article but the solution doesn’t appear to be working for me:

    add_filter( 'wpseo_sitemap_index', 'add_sitemap_custom_items' );
    function add_sitemap_cutom_items() {
    	return '<sitemap><loc>http://website.com/file.php</loc></sitemap>';
    }

    Any advice on what might be the matter?
    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trouble adding custom sitemap to index’ is closed to new replies.