Created
January 18, 2013 17:06
-
-
Save NicktheGeek/4566152 to your computer and use it in GitHub Desktop.
Sometimes you need to add or remove actions conditionally. here is a simple bit of code that allows this to be done within the functions.php file instead of requiring multiple template files.
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 | |
add_action( 'genesis_before', 'child_conditional_actions' ); | |
function child_conditional_actions() { | |
if( /**insert your conditional statements here */ ) { | |
//put your actions here | |
} | |
//you could add additional conditional statements as needed here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment