Last active
December 18, 2015 03:19
-
-
Save rfmeier/5717133 to your computer and use it in GitHub Desktop.
Remove page titles on... pages.
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_filter( 'genesis_post_title_output', 'custom_genesis_post_title_output' ); | |
/** | |
* Callback for Genesis 'genesis_post_title_output' filter. | |
* | |
* Remove the title if on a page | |
* | |
* @package Genesis | |
* @category Post Title | |
* @author Ryan Meier http://www.rfmeier.net | |
* | |
* @param string $title_output The post title output | |
* @return string $title_output The post title output | |
*/ | |
function custom_genesis_post_title_output( $title_output ){ | |
// if currently on a page, return empty string | |
if( is_page() ) | |
return ''; | |
// else, return default title output | |
return $title_output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment