Is there a is_ function for sitemaps?

There is no is_sitemap() core function in WP < 6.8, but there is a ticket for it here. The rewrite rules for the sitemap (src) use e.g. the sitemap query variable: add_rewrite_rule( ‘^wp-sitemap\.xml$’, ‘index.php?sitemap=index’, ‘top’ ); add_rewrite_rule( ‘^wp-sitemap-([a-z]+?)-([a-z\d_-]+?)-(\d+?)\.xml$’, ‘index.php?sitemap=$matches[1]&sitemap-subtype=$matches[2]&paged=$matches[3]’, ‘top’ ); add_rewrite_rule( ‘^wp-sitemap-([a-z]+?)-(\d+?)\.xml$’, ‘index.php?sitemap=$matches[1]&paged=$matches[2]’, ‘top’ ); The get_query_var( ‘sitemap’ ) is checked within the template_redirect … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)