WordPress HTML Sitemap Generator

Add the following PHP script to your functions.php file:


//HTML Sitemap Shortcode
function sitemap_generator() { ?>
<h2>Navigation</h2>
<ul>
<?php
wp_list_pages( array(
'exclude' => '',
'title_li' => '',
) ); ?>
</ul>
<?php }
add_shortcode('add_sitemap', 'sitemap_generator');

Then simply call the shortcode from within the newly created page:

Want a Fast Server Like Mine?

GET VULTR!