Charging custom CSS along with TEC style sheet

Home Forums Calendar Products Events Calendar PRO Charging custom CSS along with TEC style sheet

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1149997
    Cesar
    Participant

    Hi guys.
    Sorry for the silly question.
    I created a child theme using the Twenty Sixteen. I would like to use a custom css file so I followed the themer’s guide:

    function replace_tribe_events_calendar_stylesheet() {
       $styleUrl = get_bloginfo('template_url') . '/trive-events-pro.css';
       return $styleUrl;
    }
    add_filter('tribe_events_stylesheet_url', 'replace_tribe_events_calendar_stylesheet');
    
    function replace_tribe_events_calendar_pro_stylesheet() {
       $styleUrl = get_bloginfo('template_url') . '/tribe-events.css';
       return $styleUrl;
    }
    add_filter('tribe_events_pro_stylesheet_url', 'replace_tribe_events_calendar_pro_stylesheet');
    

    tribe-events.css exists in tribe-events/ directory of my theme.
    tribe-events-pro.css exists tribe-events/pro/ directory of my theme.
    “Default stylesheet used for events templates” is set to “Full Style” and,
    “Events template” is set to “Defaul Events Template”

    But my theme still calls style.css and not tribe-events.css or trive-events-pro.css. Is that normal?

    The website is http://final.leezgo.com

    #1150264
    Andras
    Keymaster

    Hi Cesar,

    Thanks for reaching out! I’m sorry you are having this issue. Let me help you with that.

    In the code you are using, the get_bloginfo(‘template_url’) will give you the active theme’s directory, and not the child theme’s directory.

    I suggest you use get_bloginfo(‘stylesheet_directory’), which gives you the directory path for the active child theme (or theme, is you don’t have a child theme).

    Then put your custom css files in the child theme directory, since you are referencing that. The other directories you only need if you want to override the page templates, but not for the css files.

    Let me know if this helps.

    Cheers,
    Andras

    PS: You also have a typo in the first block: tri<span style=”text-decoration: underline;”>v</span>e-events-pro.css

    #1158856
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Charging custom CSS along with TEC style sheet’ is closed to new replies.