Created
August 13, 2014 19:03
-
-
Save caseydriscoll/7068a8b9440d34c872b5 to your computer and use it in GitHub Desktop.
Tribe: Fix Month View link problem for recurring events
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
// When you only have recurring events, the next month link won't show. Resave the event or add this snippet. | |
// Written by Barry Hughes | |
// Problem thread: http://tri.be/support/forums/topic/one-side-of-month-pagination-missing/ | |
add_action( 'added_post_meta', 'fix_29781_recurrence_pagination', 10, 3 ); | |
function fix_29781_recurrence_pagination( $meta_id, $object_id, $meta_key ) { | |
if ( TribeEvents::POSTTYPE !== get_post_type( $object_id ) ) return; | |
if ( '_EventDuration' !== $meta_key ) return; | |
TribeEvents::instance()->rebuild_earliest_latest(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment