Created
October 25, 2015 01:53
-
-
Save reasonstousegenesis/c0de9adee2a1868587bc to your computer and use it in GitHub Desktop.
Replace the default site map with Genesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Paste the code BELOW this line into your child theme functions. | |
/** | |
* Replace the default site map with Genesis | |
* | |
* @author Reasons to Use Genesis | |
* @link http://reasonstousegenesis.com/genesis-sitemap-output/ | |
*/ | |
add_filter( 'genesis_sitemap_output', 'rtug_replace_sitemap' ); | |
function rtug_replace_sitemap() { | |
$sitemap = '<p>Below is a list of our main pages.</p><ul>'; | |
$sitemap .= wp_list_pages( 'title_li=&depth=1&echo=0' ); | |
$sitemap .= sprintf( '</ul><a href="%s">Back Home</a>', home_url() ); | |
return $sitemap; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment