Created
November 17, 2014 20:52
-
-
Save jesseeproductions/27c812b6f23d5cbb9315 to your computer and use it in GitHub Desktop.
Events Calendar Remove wp_title from Genesis and add custom function to replace
This file contains hidden or 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
/* | |
* Genesis Remove Genesis Meta Filter on Event Calendar Pages | |
* The Events Calendar @3.8 | |
* Genesis @2.1.2 | |
* | |
*/ | |
add_action( 'genesis_doctype', 'tribe_genesis_meta_title' ); | |
function tribe_genesis_meta_title() { | |
if( tribe_is_upcoming() || tribe_is_past() || tribe_is_map() || tribe_is_photo() || tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_photo() ) { | |
remove_action( 'genesis_title', 'genesis_do_title' ); | |
add_action( 'genesis_title', 'event_genesis_do_title', 10 ); | |
//remove_filter( 'wp_title', 'genesis_default_title', 10, 3 ); | |
} | |
} | |
/** | |
* Output Genesis title | |
* | |
*/ | |
function event_genesis_do_title() { | |
echo '<title>'; | |
wp_title( '|', true, 'right' ); | |
echo '</title>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment