Support » Plugin: The Events Calendar » Bug rel Prev and Next 404 errors

  • Resolved Daniel Chase


    First off, thank you for creating this wonderful plugin.

    If you view the source of the past events archive (example URL:, In the <head> it shows:

    <link rel="prev" href="" />
    <link rel="next" href="" />

    These link-hrefs go to 404 errors. This is bad for web crawlers. Note I also have Yoast SEO installed. Is this an issue with your plugin, Yoast SEO, or both?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Jaime


    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!


    Thread Starter Daniel Chase


    @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:

    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 7 months, 4 weeks ago by Daniel Chase.
    Plugin Support Jaime


    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!


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug rel Prev and Next 404 errors’ is closed to new replies.