Code for single event view

Home Forums Calendar Products Events Calendar PRO Code for single event view

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #11076
    Cary Bergeron
    Participant

    So on single event views like here http://www.gocolorado.com/event/test-event/ there are some items that I have showing up on single posts like the share links and join discussion but they are showing up on the event pages. I have tried removing them in an if statement using is_page_template(‘ecp-single-template.php’) and also using ‘tribe_events’ == get_post_type() but neither are working. What can I use to target all single event pages?

    #11080
    Rob
    Member

    That’s a good question, Cary. Let me get Jonah to chime in – expect a response from him over the next 24 hours.

    #11100
    Brandon
    Member

    I’m curious about this myself. I have an if statement using ‘tribe_events’ == get_post_type() to echo a specific div id but it’s not working. An answer to Cary’s question will probably help me as well.

    #11109
    Nick Ciske
    Participant

    Use tribe_is_event() as your conditional. That’s true for all event pages (including the main calendar).

    #11111
    Cary Bergeron
    Participant

    Awesome it worked thanks again!

    #11112
    Cary Bergeron
    Participant

    Awesome it worked, thanks again!

    #11113
    Jonah
    Participant

    Hi Cary,

    Try:


    if(is_single() && ‘tribe_events’ == get_post_type()) {
    //your code here
    }

    Regards,
    Jonah

    #11114
    Jonah
    Participant

    Hi Cary,

    Try using:


    if(is_single() && ‘tribe_events’ == get_post_type()) {
    //code to run
    }

    Regards,
    Jonah

    #11137
    Rob
    Member

    Thanks Nick.

    #11149
    Jonah
    Participant

    Hi Cary,

    Also try using:


    if(is_single() && ‘tribe_events’ == get_post_type()) {
    //code to run
    }

    Regards,
    Jonah

    #11150
    Jonah
    Participant

    Note: fix the single quote in the code above 🙂

    #11170
    Rob
    Member

    Thanks guys!

    #974629
    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 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Code for single event view’ is closed to new replies.