WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
post ID of an event, not in the loop (4 posts)

  1. wpelvis
    Member
    Posted 1 year ago #

    I am trying to add a body tag for certain event categories.
    I have tried this code in my functions file:

    add_filter(‘body_class’,'conf_class’);
    function conf_class($classes){
    global $post;
    if ( has_term ( ‘conference’, TribeEvents::TAXONOMY, $post->ID ) )
    { $classes[] = ‘event-conference’;}
    return $classes;
    }

    Which doesn’t work. However if i put the post id in manually, ie
    if ( has_term ( ‘conference’, TribeEvents::TAXONOMY, 73 )
    Then it works

    Is there a different way to get the post ID of an event post when not in the loop? (i can get it no problem once in the loop)
    thanks

    ps am using latest version 2.0.11

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. jonahcoyote
    Member
    Posted 1 year ago #

    Hi wpelvis,

    As mentioned in our sticky thread (http://wordpress.org/support/topic/welcome-the-events-calendar-users-read-this-first), we unfortunately are unable to help with with customization, styling or integration issues not caused by bugs with The Events Calendar. You have a few options:

    1. Check out our extensive support resources and try to figure it out on your own: https://tri.be/support/ & http://tri.be/support/forums
    2. Hire a developer to assist you. We've got a list of freelancers who know our code and who we can vouch for. Email us (pro at tri.be) and we'll pass that list your way.
    3. Purchase a Pro license to get more support: http://tri.be/shop/wordpress-events-calendar-pro/. As mentioned in the sticky thread, we can provide both a deeper and more frequent level of support for PRO users.

    I hope that helps and good luck!

    Cheers,
    - Jonah

  3. wpelvis
    Member
    Posted 1 year ago #

    Thanks I have pro support but I was asking here as often answers come from other users.

  4. jonahcoyote
    Member
    Posted 1 year ago #

    Sounds good wpelvis, if you post to the PRO forums, we can help you out more there.

    Cheers,
    Jonah

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic