Jaime
(@jaimemarchwinski)
Hi @riseofweb
Thanks for reaching out!
I just tested this out on my local site, and the links there which are tied to the previous and next arrows on that page do not lead to 404s.
It’s possible that this is tied to Yoast, because I was not able to replicate the issue without it.
Let me know if that helps!
Thanks,
Jaime
@jaimemarchwinski Thank you for your response and for looking into it for me.
I found that the issue is with the Yoast SEO Plugin. When Yoast is disabled it does not show the next and prev rel links in the head.
I manage multiple websites with both Yoast SEO and your plugin installed. I found identical issues on all websites that have the 2 plugins installed.
So I have to assume that this is a compatibility issue between the 2 plugins.
I created a filter in my theme’s functions to make Yoast SEO compatible with your plugin:
https://gist.github.com/amboutwe/66c583d2ef4015a8a244ee3e0e8cd1a0
Here is what I implemented. So far this seems to do the trick.
//Tribe Events Calendar - Past Events - Yoast SEO Compatibility Fix
add_filter( 'wpseo_next_rel_link', 'custom_remove_wpseo_next_prev' );
add_filter( 'wpseo_prev_rel_link', 'custom_remove_wpseo_next_prev' );
function custom_remove_wpseo_next_prev( $link ) {
$queryURL = parse_url( html_entity_decode( esc_url( add_query_arg( $arr_params ) ) ) );
parse_str( $queryURL['query'], $getVar );
$pastEvent = $getVar['tribe_event_display'];
if ( htmlspecialchars($pastEvent) == "past" ) {
return false;
} else {
return $link;
}
}
-
This reply was modified 5 years, 7 months ago by
Daniel Chase.
Jaime
(@jaimemarchwinski)
Hi @riseofweb
I’m glad to hear that you were able to find a solution here and thanks for sharing!
I’m going to mark this thread as Resolved, but feel free to open up a new one if anything else comes up.
Have a wonderful day!
Thanks,
Jaime