Events Made Easy Forums How do I … Is User Logged In

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43734
    Anonymous
    Inactive

    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?

    #49419
    Franky
    Keymaster
    #49420
    Anonymous
    Inactive

    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.

    #49421
    Franky
    Keymaster

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top