Display different header image on calendar/upcoming/single view

Home Forums Calendar Products Events Calendar PRO Display different header image on calendar/upcoming/single view

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #25662
    Sandro
    Participant

    Hi,

    I need your help to display different header image on calendar template files. So far I’ve it working everywhere except on upcoming events template.

    My code looks like this:
    if (tribe_is_event() or tribe_is_month() or tribe_is_day()) { echo "imgheader_events"; }

    #25666
    Barry
    Member

    Hi Sandro, that seems to work for me if I place it in my theme’s header.php template and view the upcoming events list. Can you provide a bit more context as to how you are using this?

    #25667
    Sandro
    Participant

    If upcoming events list doesn’t contain any events, my if function doesn’t get evaluated as true thus echo doesn’t come through. In case when there is single event present in the list than it is evaluated as true. Same works for calendar homepage.

    #25668
    Barry
    Member

    There is a tribe_is_upcoming() function however I don’t believe it’s designed for this context and will return true even when used outwith the upcoming events list. Let me have a quick think about this.

    #25669
    Sandro
    Participant

    I tested it extensively, and my problem is this page: /events/upcoming/
    On single day upcoming list it works. So month and day template are fine.

    #25670
    Sandro
    Participant

    Yes I tested tribe_is_upcoming() and it would always get evaluated true even on homepage.

    #25672
    Barry
    Member

    Hey Sandro, so I discussed this with a member of the dev team and he agreed tribe_is_upcoming() should work in these circumstances. Of course, it doesn’t and so this has been logged as a bug and hopefully will be addressed shortly.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Display different header image on calendar/upcoming/single view’ is closed to new replies.