Created
October 30, 2011 05:39
-
-
Save billerickson/1325557 to your computer and use it in GitHub Desktop.
Custom Loop for Archive Layout
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 | |
/** | |
* Custom Loop for Archive Layout | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-genesis-custom-layout/ | |
*/ | |
function be_archive_layout_loop() { | |
$site_layout = genesis_site_layout(); | |
if ( 'sidebar-content-archive' == $site_layout ) { | |
be_archive_loop(); | |
} else { | |
genesis_standard_loop(); | |
} | |
} | |
remove_action('genesis_loop', 'genesis_do_loop'); | |
add_action('genesis_loop', 'be_archive_layout_loop'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment