Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Helper for customizations relying on front page pagination hack
* Workaround for themes, plugins and customizations that rely on
* redirect_canonical() *not* redirecting when pagination is used
* on a static front page.
add_action( 'init', 'modify_pro_canonical_filter' );
function modify_pro_canonical_filter() {
if ( ! class_exists( 'TribeEventsPro' ) ) return;
$pro = TribeEventsPro::instance();
$filter = array( $pro, 'filter_canonical_link_on_recurring_events' );
remove_filter( 'wp', $filter, 10, 1 );
add_filter( 'template_redirect', $filter, 20, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.