-
-
Save jesseeproductions/8d0947375b5ba10a1b5e to your computer and use it in GitHub Desktop.
Filter for Full Content on The Events Calender Views Page in Genesis when using Default Page Template in Event Display Settings
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
/** | |
* The Events Calendar - Bypass Genesis genesis_do_post_content in Event Views | |
* | |
* This snippet overrides the Genesis Content Archive settings for Event Views | |
* | |
* Event Template set to: Admin > Events > Settings > Display Tab > Events template > Default Page Template | |
* | |
* The Events Calendar @4.0.4 | |
* Genesis @2.2.6 | |
*/ | |
add_action( 'get_header', 'tribe_genesis_bypass_genesis_do_post_content' ); | |
function tribe_genesis_bypass_genesis_do_post_content() { | |
if ( class_exists( 'Tribe__Events__Main' ) && class_exists( 'Tribe__Events__Pro__Main' ) ) { | |
if ( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() || ( tribe_is_recurring_event() && ! is_singular( 'tribe_events' ) ) ) { | |
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); | |
remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); | |
add_action( 'genesis_entry_content', 'the_content', 15 ); | |
} | |
} elseif ( class_exists( 'Tribe__Events__Main' ) && ! class_exists( 'Tribe__Events__Pro__Main' ) ) { | |
if ( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() ) { | |
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); | |
remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); | |
add_action( 'genesis_entry_content', 'the_content', 15 ); | |
} | |
} | |
} |
This seems to be working within the if statement on my end instead of the above
remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
remove_action( 'genesis_post_content', 'genesis_do_post_content' );
add_action( 'genesis_post_content', 'the_content', 15 );
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jesseeproductions Is this still working? It doesn't seem to do anything on a site I'm working on that is using Genesis 2.4.2.