Tribe shortcode can I add 2 categories?

Home Forums Calendar Products Events Calendar PRO Tribe shortcode can I add 2 categories?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1345993
    Barry Dollar
    Participant

    Here is the shortcode I am using. How can I add more than one category?
    [tribe_events view=”list” category=”am” tribe-bar=”false”]

    #1346002
    snorton
    Participant

    Hey @gabaptist, as shown in this post, you can add multiple categories by separating them with commas.

    [tribe_events view="list" categories="am,pm,gm,cm" tribe-bar="false"]

    You can even just use the IDs for your event categories instead of the category name, like this:

    [tribe_events view="list" categories="#1,#2,#3" tribe-bar="false"]

    Peace!

    #1346005
    Barry Dollar
    Participant

    I copied and pasted the code, change to my two categories, but it pulls in events from all categories. Here is the code I placed on the Page:
    [tribe_events view=”list” categories=”am,pe” limit=”4″ tribe-bar=”false”]

    In one thread I found a short code that works but it is a very different look…
    [tribe_events_list categories=”am, pe” limit=”12″ tribe-bar=”false”]

    I prefer the first one to work, so what am I doing wrong?
    And, is the second short code current since the one you sent shows “list” as a view?

    Here is the page: http://gabaptist.staging.wpengine.com/associationalmissions/
    The working code is listed first, the code I want to work is second, pulling for all categories and the limit is not working.

    #1346189
    snorton
    Participant

    Hey @gabaptist, I’m not sure, but in this thread it looks like you’re using quote marks instead of " quote marks. There is a difference between the two and, unfortunately, the use of the curly quote marks breaks PHP, so it also breaks shortcode functionality – that is the reason why the shortcode itself works but the arguments don’t.

    As far as your question regarding the shortcode example I provided, that came straight from the ECP knowledgebase – I presume it’s current since it functions properly. the [tribe_events_list] also operates as desired for me as designed when I use the straight quotes [tribe_events view="list" categories="am,pe" limit="4" tribe-bar="false"]

    Try that one and you should be good to go.

    • This reply was modified 6 years, 8 months ago by snorton. Reason: Responding to question about the shortcode example I provided
    #1346207
    Barry Dollar
    Participant

    I think I have accurately written the html:

    This works correctly –
    [tribe_events_list categories="am,pe" limit="12" tribe-bar="false"]

    This is the one I want to use, however it does not work correctly –
    [tribe_events view="list" categories="am,pe" limit="4" tribe-bar="false"]

    Can you see anything wrong with the code? I don’t.
    The difference is the view=”list” is not working vs tribe_events_list that does work but I prefer the view=”list” layout.

    Any ideas?

    #1346222
    snorton
    Participant

    That seems simple enough – the result of the shortcode displays the full calendar and there isn’t a way that I know of on the front end to filter the main calendar with more than one category (I’m just an average user like you). I’d suggest you submit that as a feature request! https://tribe.uservoice.com/forums/195723-feature-ideas

    #1346631
    Courtney
    Member

    Hi Barry and @snorton

    You can see on https://theeventscalendar.com/knowledgebase/embedding-calendar-views-tribe_events-shortcode/ that we do filter the view with categories. Do refer to the ” issue at the bottom of that page. WordPress/TinyMCE has a habit of being a bit too helpful at times, and creating a bit of a problem.

    [tribe_events view="list" category="new, test"]
    

    However, the limit option is only available in Widget Shortcodes: https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/.

    I do like the idea, and would love for your feedback at http://tribe.uservoice.com.

    Is there anything else I can help you with?

    Thanks
    Courtney 🙂

    #1346743
    snorton
    Participant

    @courtney, for multiple categories he’s gotta use ‘categories’ and not ‘category’. (Sorry, I know this isn’t my thread, but I’ve just been hanging out around here – respectfully, of course – and thought I’d help some other folks while I wait for some feedback on one I posted).

    I posted above a solution but he indicated that wasn’t his desired effect. I think I got confused/mixed-up in the subsequent responses. Cheers 🙂

    #1346791
    Mathew
    Participant

    Unless something has changed very recently, the shortcode [tribe_events] does not support multiple categories.

    https://theeventscalendar.com/support/forums/topic/shortcode-will-only-show-1-category-does-not-show-tags/#dl_post-1298805

    There is sort of a work-around in the article.

    #1347482
    Courtney
    Member

    Wow… look at that. I do love learning from our customers.

    After more thorough testing, it does seem like “category” is limited as the only option in [tribe_events] while our widget shortcodes can support “categories”.

    [tribe_events_list categories="test, new"]
    

    https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/


    @mathewlewis
    link is the correct information. So sorry about that. Please do submit that request for adding it as a feature.

    Thanks
    Courtney 🙂

    #1358350
    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 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Tribe shortcode can I add 2 categories?’ is closed to new replies.