true ), 'objects' ); $agenli_active_types = AGENLI_Sitemap::get_enabled_types(); $agenli_rules = get_option( 'rewrite_rules' ); $agenli_rules_ok = ! empty( $agenli_rules ) && isset( $agenli_rules['^sitemap\\.xml$'] ); /* ── Handle exclusion saves ── */ if ( isset( $_POST['agenli_save_exclusions'] ) ) { check_admin_referer( 'agenli_sitemap_exclusions' ); foreach ( $agenli_all_types as $type_key => $type_obj ) { $excluded = isset( $_POST[ 'exclude_' . $type_key ] ) ? array_map( 'absint', (array) $_POST[ 'exclude_' . $type_key ] ) // phpcs:ignore : array(); AGENLI_Sitemap::save_excluded_ids( $type_key, $excluded ); } AGENLI_Sitemap::clear_cache(); echo '

Sitemap exclusions saved. Cache cleared.

'; } ?>

🌏 Sitemap Generator

Auto-generate your XML sitemap and keep search engines updated.

⚠️
Sitemap URL needs one-time activation
Go to Settings → Permalinks and click Save Changes. Takes 5 seconds.
▶ Go to Permalinks → Save
Status
Sitemap
Auto-updates when you publish content
>
↗
Submit to Search Engines

After generating, also submit manually to get indexed faster.

Google Search Console ↗ Bing Webmaster Tools ↗
Include in Sitemap

Choose which post types to include. Pages with NoIndex set will be automatically excluded.

$type_obj ) : $count = wp_count_posts( $type_key ); $pub = isset( $count->publish ) ? (int) $count->publish : 0; $checked = in_array( $type_key, $agenli_active_types, true ); ?>
Exclude Specific Pages / Posts from Sitemap

Tick any page or post you want to remove from the sitemap — useful for thank-you pages, landing pages, temporary pages, or anything you don't want Google to index via sitemap.

$type_obj ) : $posts = get_posts( array( 'post_type' => $type_key, 'post_status' => 'publish', 'posts_per_page' => 200, 'orderby' => 'title', 'order' => 'ASC', ) ); if ( empty( $posts ) ) continue; $excluded = AGENLI_Sitemap::get_excluded_ids( $type_key ); ?>
labels->name ); ?> ( published)
ID, $excluded, true ); ?>