Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Created October 24, 2015 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonstousegenesis/dc530d8f9bf379df0c08 to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/dc530d8f9bf379df0c08 to your computer and use it in GitHub Desktop.
Add a site map with Genesis
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Add a site map with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/genesis-sitemap/
*/
add_action( 'your_desired_hook', 'rtug_sitemap' );
function rtug_sitemap() {
if ( is_singular() )
genesis_sitemap( 'h3' );
else
genesis_sitemap();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment