WP_Sitemaps_Index::get_index_url() – Builds the URL for the sitemap index.

You appear to be a bot. Output may be restricted

Description

Builds the URL for the sitemap index.

Usage

$string = WP_Sitemaps_Index::get_index_url();

Parameters

Returns

string The sitemap index URL.

Source

File name: wordpress/wp-includes/sitemaps/class-wp-sitemaps-index.php
Lines:

1 to 9 of 9
  public function get_index_url() {
    global $wp_rewrite;

    if ( ! $wp_rewrite->using_permalinks() ) {
      return home_url( '/?sitemap=index' );
    }

    return home_url( '/wp-sitemap.xml' );
  }
 

 View on GitHub View on Trac