Shortcode Limit Events by Tag: Shows all events if the tag doesn't match

Home Forums Calendar Products Events Calendar PRO Shortcode Limit Events by Tag: Shows all events if the tag doesn't match

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1148169
    Kate
    Participant

    Hello,
    We have a shortcode working well limiting the results with a tag on a page that matches the tag, however, on pages where the tag doesn’t match, it shows all the events instead of the desired behavior, which is none.

    We’re using this code: do_shortcode( ‘[tribe_events_list tag=”‘.get_the_slug().'” limit=”3″]’ ), where the “get_the_slug()” piece matches the tag entered in the Event.

    To summarize, this works brilliantly on pages where there are corresponding events that match the page slug, but on the rest of the pages, it displays all events. We want it to display none where there are no Events that are tagged with the page slug that the shortcode is on.

    Make sense?
    Thanks,

    #1148357
    Nico
    Member

    Hi there Kate,

    Thanks for getting in touch with us! I’ll help you here…

    First of all, I could reproduce this issue when using a non-existing tag name. If the tag name exists but has no events assigned then it shows up correctly. I took a quick look into the code to see if there’s a way to amend this via snippet but I couldn’t find any clue 🙁

    Do you think you can create a tag for each page for now?

    Please let me know about it,
    Thanks,
    Nico

    #1156707
    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 ‘Shortcode Limit Events by Tag: Shows all events if the tag doesn't match’ is closed to new replies.