Home › Forums › Calendar Products › Community Events › Tribe Event's Shortcode Conditional Logic
- This topic has 5 replies, 3 voices, and was last updated 10 years ago by
Support Droid.
-
AuthorPosts
-
April 4, 2016 at 8:40 am #1097918
Lang
ParticipantHi 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 ?
April 5, 2016 at 7:32 am #1098298Geoff
MemberHi 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!
GeoffApril 8, 2016 at 5:00 am #1099989Lang
ParticipantHow 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.
April 8, 2016 at 5:22 am #1099997Lang
ParticipantHey 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”]
April 8, 2016 at 7:17 am #1100027Geoff
MemberAwesome job, Lang!
Yes, you can comma-separated the categories like that to display events in multiple categories. đŸ™‚
Cheers!
GeoffApril 23, 2016 at 9:35 am #1106289Support Droid
KeymasterThis 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. -
This reply was modified 10 years ago by
-
AuthorPosts
- The topic ‘Tribe Event's Shortcode Conditional Logic’ is closed to new replies.
