# jetpack/16.3-a.5/modules/shortcodes/sitemap.php

Jetpack – WP Security, Backup, Speed, &amp; Growth, version 16.3-a.5. 35 lines.

- Page: https://pluginprobe.com/plugins/jetpack/16.3-a.5/code/modules/shortcodes/sitemap.php
- Raw: https://pluginprobe.com/plugins/jetpack/16.3-a.5/raw/modules/shortcodes/sitemap.php
- Modified: 2025-11-24T17:00:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetpack/16.3-a.5/code/modules/shortcodes/sitemap.php#L10-L20`.

```php
<?php
/**
 * Sitemap shortcode.
 *
 * Usage: [sitemap]
 *
 * @package automattic/jetpack
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit( 0 );
}

add_shortcode( 'sitemap', 'jetpack_sitemap_shortcode' );

/**
 * Renders a tree of pages.
 *
 * @since 4.5.0
 *
 * @return string
 */
function jetpack_sitemap_shortcode() {
	$tree = wp_list_pages(
		array(
			'title_li' => '<b><a href="/">' . esc_html( get_bloginfo( 'name' ) ) . '</a></b>',
			'exclude'  => get_option( 'page_on_front' ),
			'echo'     => false,
		)
	);
	return empty( $tree )
		? ''
		: '<ul class="jetpack-sitemap-shortcode">' . $tree . '</ul>';
}

```
