Conditional Tag Issues

Home Forums Calendar Products Events Calendar PRO Conditional Tag Issues

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #30241
    dalbeck
    Participant

    Hey Everyone,

    So having some trouble getting specific elements in my sidebar file to show up on the Events List, Calendar and Single event details page. I have been scouring Google and the site for quite some time now.. closest I could find was on the WordPress forums:
    I found this:
    http://pastebin.com/5wfnWSZt
    didn’t work.. only shows the sidebar items on the single event details page also tried modifying this to be:
    http://pastebin.com/5kQA8CP8

    That didn’t work either. Any help would be great! Thank you.

    #30244
    Jonah
    Participant

    Hi Danny, does this help: https://gist.github.com/2415009

    – Jonah

    #30245
    dalbeck
    Participant

    Yeah.. tried that too .. no luck =/

    #30246
    Jonah
    Participant

    Can you share more examples or the full code you are working with? Please post to http://snippi.com/ or https://gist.github.com/

    Thanks,
    Jonah

    #30276
    dalbeck
    Participant

    This is my current sidebar file: http://snippi.com/s/7g3g9zh

    #30277
    Jonah
    Participant

    Hmm, it looks like that should work. Have you tried taking out some of the conditions to see if any of them work? For example, stripping it all down to using just tribe_is_month() ?

    – Jonah

    #30296
    dalbeck
    Participant

    Jonah,

    I did try just doing them individually and that didn’t seem to work either.. any other thoughts? Right now on the Events List view my sidebar doesn’t display at all, and on the Calendar view it doesn’t either.

    #30310
    Jonah
    Participant

    Ok Danny, sorry about that. Try this pattern instead:

    if ( $query->query_vars['eventDisplay'] == 'upcoming' || $query->query_vars['eventDisplay'] == 'past' || $query->query_vars['eventDisplay'] == 'month' && $query->query_vars['post_type'] == TribeEvents::POSTTYPE && !is_tax(TribeEvents::TAXONOMY) && empty( $query->query_vars['suppress_filters'] ) ) {
    //your code here
    }

    Does that work at all?

    – Jonah

    #30312
    dalbeck
    Participant

    Still nothing, heres my whole sidebar: http://pastebin.com/gfZW9wyH

    #30313
    Jonah
    Participant

    Hmmm, actually the last conditional code I posted doesn’t work for me in Genesis but the original conditional do… Have you tried deactivating all other plugins? I wonder if something else is interfering?

    – Jonah

    #30419
    dalbeck
    Participant

    Jonah,

    Yeah, I tried disabling a ton of plugins.. still nothing =/ any other ideas?

    #30420
    dalbeck
    Participant

    Sorry for double post.. just found this in my error logs:
    Call to undefined function tribe_is_archive()

    I will play around with the conditional maybe that could be screwing it up?

    #30429
    dalbeck
    Participant

    Ok figured it out. Was missing a closing tag and calling 2 functions that didn’t exist: tribe_is_archive() and tribe_is_events. Once I deleted those from the condition everything works. Final line looks like this:

    Hope this helps someone else… thanks for your help Jonah!

    #30430
    dalbeck
    Participant

    if((get_post_type() == ‘tribe_events’ && tribe_is_upcoming()) || tribe_is_month() || tribe_is_by_date() || tribe_is_month() && !is_tax() ) {

    — Sorry didn’t post in the last message.. really sorry for like 3 extra posts.

    #30432
    Jonah
    Participant

    Hey Danny,

    Phew, glad to hear you figured it out. Let us know if you need anything else.

    Thanks,
    Jonah

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘Conditional Tag Issues’ is closed to new replies.