Created
March 15, 2022 13:18
-
-
Save skyshab/f6cf554b86d6d14c5a3bbab1b5f030b5 to your computer and use it in GitHub Desktop.
Genesis calendar fix simplified
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 | |
/** | |
* Fix Calendar views in Genesis based themes. | |
* | |
* This snippet overrides the Genesis Content Archive settings for Event Views | |
* when Events > Settings > Display Tab > Events template is set to Default Page Template. | |
* | |
*/ | |
add_action( 'get_header', function() { | |
if ( ! class_exists( 'Tribe__Events__Main' ) ) { | |
return; | |
} | |
if ( is_post_type_archive( '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 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment