Created
November 17, 2015 00:05
-
-
Save reasonstousegenesis/8a1b90fae4b2ab68ee68 to your computer and use it in GitHub Desktop.
Replace the primary sidebar with the archive content 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 | |
// Template Name: Archive | |
/** | |
* Replace the primary sidebar with the archive content with Genesis | |
* | |
* @author Reasons to Use Genesis | |
* @link http://reasonstousegenesis.com/genesis-page-archive-content/ | |
*/ | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
add_action( 'genesis_sidebar', 'rtug_page_archive_content' ); | |
function rtug_page_archive_content() { | |
$heading = ( genesis_a11y( 'headings' ) ? 'h2' : 'h4' ); | |
genesis_sitemap( $heading ); | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment