Created
August 16, 2012 14:00
-
-
Save aaronhartland/3370325 to your computer and use it in GitHub Desktop.
404 Page Layout - CellPath
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 | |
/** | |
* CellPath 404 Page Layout | |
* | |
* @package CellPath | |
* @author Aaron Hartland, http://www.aaronhartland.com | |
* @copyright Copyright (c) 2012, Aaron Hartland | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* | |
*/ | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'cellpath_404_loop_helper' ); | |
/** | |
* Add widget support for the 404 page. | |
* If no widgets active, display the default loop/message. | |
* | |
*/ | |
function cellpath_404_loop_helper() { | |
if ( is_active_sidebar( '404-page' ) ) { | |
dynamic_sidebar( '404-page' ); | |
} | |
else { | |
genesis_standard_loop(); | |
} | |
} | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment