• Resolved l3000

    (@l3000)


    Hi and thanks for taking your time in advance.

    I run a page with 4 different sections, each having an own logo in the header. When using other custom post types such as ‘Portfolio’ for example, I use categories/custom taxonomies to differenciate between the sections. And then the following code to change the logo’s div class in single posts:

    <? if ( is_singular( 'theme_portfolio' ) ) {
    foreach((get_the_terms($post->ID, 'portfolio_category')) as $term) {
    if($term->term_id == 16){ 
    echo 'cultural';
    }
    }
    }
    ?>

    I’d like to do the same for single event posts within the Tribe Events Calendar, and I don’t get it to work. Using this code here…

    <? if ( is_singular( 'tribe_events' ) ) {
    foreach((get_the_terms($post->ID, 'tribe_events_cat')) as $term) {
    if($term->term_id == 16){ 
    echo 'cultural';
    }
    }
    }
    ?>

    …returns the following message:

    Warning: Invalid argument supplied for foreach() in ../themes/theme/mod_logo.php on line 314

    I tried tribe_get_event_cat_ids or tribe_get_event_cat without success. And if, then only within the loop. The plugin’s documentation wasn’t really helping either.

    I would be very grateful for any help.

    Thanks!

    Lauren

Viewing 1 replies (of 1 total)
  • Hey Lauren,

    Thanks for posting, glad like our plugin, & I’m happy to help.:)

    This kind of request would require some customization. We have some resources for doing that here. If you need to find someone to help with the customizations, we also have some tips for finding help here.

    Hope this helps!

    Thanks,

    Shelby

Viewing 1 replies (of 1 total)
  • The topic ‘Help using the event calendar’s categories to output different logos’ is closed to new replies.