"View More…" wrong URL

Home Forums Calendar Products Events Calendar PRO "View More…" wrong URL

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1156641
    Hans
    Participant

    We are using the [tribe_events_list] shortcode with the “tags=” Option and found out that if you press the “View More …” (“Mehr anzeigen …”) link at the bottom of the list, the link goes to
    /tag/eventtag
    and not to
    /events/tag/eventtag
    as it should (and works if manually entered,).

    The List Events widget behaves the same way, if filtered by tag and not by category. If filtered by category or by more than one tag, the resulting link is just /events with no further filtering at all.

    Any viable solution highly appreciated. The link should at least point to /events.

    This is a pruduction site. We did deactivate all other plugins and themes on a test site, with no difference in behavior.

    #1157317
    Nico
    Member

    Howdy Hans,

    Welcome to our support forums and thanks for reaching out to us!

    I could reproduce this on my end, and inspecting the code I see where the issue is coming from. We are using the WordPress function get_term_link to get the taxonomy link, and in the case of tags, that’s a default WP taxonomy which URL is /tag/eventtag as opposed to event categories which are a taxonomy we create and which URL is events/cetrgory/eventcat.

    This snippet should make it right for now, please paste it in theme’s (or child theme’s) functions.php file:

    /* Tribe, append 'events' to default tag link in List Widget view all link */
    function tribe_fix_tag_all_link ( $link ) {

    // search for 'tag' in link
    $pos = strrpos($link, 'tag');

    // bail if no 'tag' in link
    if ($pos === false) return $link;

    // add events slug to the tag link
    return str_replace('tag', 'events/tag', $link);

    }

    add_filter ( 'tribe_events_get_list_widget_view_all_link', 'tribe_fix_tag_all_link' );

    Let me know if it fixes the issue,
    Best,
    Nico

    #1166472
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘"View More…" wrong URL’ is closed to new replies.