Help Writing a Category Specific Conditional

Home Forums Calendar Products Events Calendar PRO Help Writing a Category Specific Conditional

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11516
    Brandon
    Member

    I’m trying to write a conditional that will allow me to put a bit of text at the top of the category list page that is specific to that category. I know how to do this with regular WordPress categories but am not sure of how to structure the call because of the specific taxonomy used for the event calendar. I’ve created a new events/list.php template in my theme, and can see it’s being used, so all good there, I just need a bit of help with what template tag to use for the query.

    As an example, I would like to put a different description at the top of this page:

    http://bcparadev.org/event-calendar/category/fundraising

    than this one:

    http://bcparadev.org/event-calendar/category/partner

    Any advice appreciated.

    #11529
    Rob
    Member

    Hey Brandon. This should be doable; let me get our dev Jonah to take a look here and respond directly.

    #11548
    Jonah
    Participant

    Hi Brandon,

    I believe what you’re looking for is something along these lines:


    if(term_exists('fundraising', 'tribe_events_cat')) {
    //different description
    }

    This was also talked about here: https://theeventscalendar.com/support/forums/topic/event-category-specific-sidebars/#post-11186

    I hope that helps,
    Jonah

    #974659
    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 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Help Writing a Category Specific Conditional’ is closed to new replies.