Tribe Event's Shortcode Conditional Logic

Home Forums Calendar Products Community Events Tribe Event's Shortcode Conditional Logic

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1097918
    Lang
    Participant

    Hi guys,

    I have a site, that has two sections.

    One that were people have to login :

    http://www.collegecentreofboardexcellence.ca/login, after they log in they are redirected to this page:

    and another, where people don’t have to login:

    http://www.collegecentreofboardexcellence.ca/home

    On the page : http://www.collegecentreofboardexcellence.ca/home

    I want the widget shortcode to show only certain categories depending on if someone logs in or not.

    Basically, I have a user called “college”, that I want to show only “Ontario” category events in the sidebar.

    Is this possible ?

    [tribe_events_list limit=”5″]

    Is it possible to add conditional logic to this shortcode ?

    #1098298
    Geoff
    Member

    Hi Lang,

    What an interesting question!

    The shortcode itself does not include conditional logic. Instead, I would suggest adding the shortcode to your template and wrapping a conditional statement around each instance of it so that the version you want to display for certain people is the one that shows.

    Does that make sense and will it work for you? Please let me know. đŸ™‚

    Cheers!
    Geoff

     

    #1099989
    Lang
    Participant

    How would I go about doing that ?

    Are there any tutorials on how to do this ?

    Can I not use the conditional widget logic plugin ?

    • This reply was modified 10 years ago by Lang.
    #1099997
    Lang
    Participant

    Hey guys,

    I figured it out, I’m using eyesonly plugin shortcodes to apply to the widget.

    My only question now is how do I show multiple categories using the tribe event list shortcode.

    Right now this is my code in the widget:

    [eyesonly username=”college” level=”administrator”] [tribe_events_list limit=”5″ category=”ontario”][/eyesonly]
    [tribe_events_list limit=”5″ category=”non-ontario”]

    If I wanted to show multiple categories is the short code likethis :

    [tribe_events_list limit=”5″ category=”ontario,unconfirmed-ontario”]

    #1100027
    Geoff
    Member

    Awesome job, Lang!

    Yes, you can comma-separated the categories like that to display events in multiple categories. đŸ™‚

    Cheers!
    Geoff

    #1106289
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Tribe Event's Shortcode Conditional Logic’ is closed to new replies.