Ready to get started?Download WordPress


WP Calendar
Using custom fullcalendar.css with child theme (1 post)

  1. ajbrowe
    Posted 7 months ago #

    I came across an issue when trying to use a custom fullcalendar.css in a child theme.

    The plugin tries to load the fullcalendar.css from the parent theme (in my case twentytwelve), as I have not modified the parent theme the file is not present.

    I have implemented a fix which I think should work for all users

    --- fsCalendar.php      2013-08-20 22:07:35.000000000 +0100
    +++ fsCalendar.php.fix  2013-08-20 22:07:29.000000000 +0100
    @@ -196,9 +196,9 @@
             function hookRegisterStyles() {
                    if (!is_admin() && get_option('fse_load_fc_libs') == true) {
                            // Check if user has its own CSS file in the theme folder
    -                       $custcss = get_template_directory().'/fullcalendar.css';
    +                       $custcss = get_stylesheet_directory().'/fullcalendar.css';
                            if (file_exists($custcss))
    -                       $css = get_bloginfo('template_url').'/fullcalendar.css';
    +                       $css = get_stylesheet_directory_uri().'/fullcalendar.css';
                            $css = self::$plugin_css_url.'fullcalendar.css';
                            wp_enqueue_style('fullcalendar', $css);



You must log in to post.

About this Plugin

About this Topic