- This topic has 3 replies, 2 voices, and was last updated 12 years, 9 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Is User Logged In
Tagged: condition
Can I use the WordPress function is_user_logged_in() within the Default Single Events page?
If not, is there an equivalent within EME that I can use with [event_if] or otherwise?
Yes: #_IS_LOGGED_IN, see http://www.e-dynamics.be/wordpress/?cat=24
Thanks, Franky. A follow-up: Can you nest [events_if] tags, or alternatively, can you combine conditions?
The pseudocode version of what I’d like to do is:
if(user_is_logged_in() && reservations_allowed()){
put_thing1_in_the_page();
}
if(!user_is_logged_in() && reservations_allowed()){
put_thing2_in_the_page();
}
if(!reservations_allowed()){
put_thing3_in_the_page();
}
I tried to do this by nesting an [event_if tag=#_IS_LOGGED_IN]
tag inside an [event_if tag=#_IS_RSVP_ENABLED]
tag to accomplish the first two, but it doesn’t seem to parse properly.
Yes you can, but using [events_if2] inside [events_if] (wordpress doesn’t like it otherwise).
See at the bottom of http://www.e-dynamics.be/wordpress/?cat=24