Different Template per Category

Home Forums Calendar Products Events Calendar PRO Different Template per Category

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28770
    Anthony D’Arco
    Participant

    Ok, so I know this is digging deep, but you guys helped me with this before you separated yourself from Code Canyon. Basically, what we did was we created a simple if else statement to check if an event was in a category. What we wrote was something like this:

    if ( has_sp_events_cat( ‘no-header-info’ ) )

    However, I can’t seem to get the same type of statement to work since the upgrade. I did try making it: if ( has_tribe_events_cat( ‘no-header-info’ ) ) , but that didn’t work. I assume it is just a matter of the function changing, but I can’t seem to find what it changed to.

    Thank you,
    Anthony

    #28780
    Jonah
    Participant

    Hi Anthony,

    You can use:

    if( has_term( 'category-slug-here', 'tribe_events_cat' ) ) {
    // do something
    }

    Does that help?

    – Jonah

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Different Template per Category’ is closed to new replies.