Issue with fix that was provided

Home Forums Calendar Products Events Calendar PRO Issue with fix that was provided

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #41375
    jts2005
    Participant

    I had the issue where my Calendar was mimicking the event posted. I would copy the following php code below and it would screw up my CSS on my site. I followed the recommendations that was provided and added the following to my functions.php.

    // Try to stop the first event category from being added to the article classes
    // (when the default page template is used) – Thanks Barry
    add_filter(‘post_class’, ‘remove_tribe_cat_once’, 1);

    function remove_tribe_cat_once(array $classes) {
    if ( class_exists(‘TribeEvents’) ) {
    // The Main Calendar Page or Calendar Category Page
    if (( tribe_is_month() && !is_tax() ) || ( tribe_is_month() && is_tax() )) {
    static $count = 0;
    if ($count++ === 0) {
    remove_filter(‘post_class’, array(TribeEvents::instance(), ‘post_class’));
    }
    else {
    add_filter(‘post_class’, array(TribeEvents::instance(), ‘post_class’));
    remove_filter(‘post_class’, ‘remove_tribe_cat_once’);
    }
    return $classes;
    }
    }
    }

    #41491
    Barry
    Member

    Hi jts2005, if I remember correctly that was a possible fix specifically relating to a third-party plugin (The Events Calendar Category Colors) … if that is the context in which you are using it then just be aware that we don’t offer any support for that here (though there’s no problem if you want to keep this open and discuss the issue – it’s just not something we officially support).

    Also, for reference, I believe this will no longer be an issue when 3.0 is release 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Issue with fix that was provided’ is closed to new replies.