jetpack_sitemap_shortcode

Renders a tree of pages.

Description

(string) jetpack_sitemap_shortcode(); 

Returns (string)


Usage

  1. if ( !function_exists( 'jetpack_sitemap_shortcode' ) ) { 
  2. require_once '/modules/shortcodes/sitemap.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_sitemap_shortcode(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/modules/shortcodes/sitemap.php  
  1. function jetpack_sitemap_shortcode() { 
  2. $tree = wp_list_pages( array( 
  3. 'title_li' => '<b><a href="/">' . esc_html( get_bloginfo( 'name' ) ) . '</a></b>',  
  4. 'exclude' => get_option( 'page_on_front' ),  
  5. 'echo' => false,  
  6. ) ); 
  7. return empty( $tree ) 
  8. ? '' 
  9. : '<ul class="jetpack-sitemap-shortcode">' . $tree . '</ul>';