Additional url.xml to sitemap index

[ad_1]

Thread Starter
amot99

(@amot99)

Hello, maybe i’ve found the solution: i noticed that the rewrite rules have been blocking my custom url, so i used the filter showed below to add my url to the rewrite rules

add_filter( 'rewrite_rules_array', 'addPlacesToRewriteRules', 1, 1 );
function addPlacesToRewriteRules( $wp_rules ) {
    $sm_rules        = array(
        'places\.xml$' => 'index.php?xml_sitemap=params=places',
        );
        return array_merge( $sm_rules, $wp_rules );
    }

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer