I believe I found a bug in functions.php
-
There is a function (in functions.php of course) called: ac_css_files()
The wp_enqueue_style() calls inside that function are using get_template_directory_uri() to return a path to the CSS directories. If you try to create a child theme this is going to break your local CSS from being loaded!
Change three lines (around line 100 in Functions.php) or override the entire function it in your local child’s functions.php (easy to do since the parent function is conveniently wrapped inside of:
if ( ! function_exists( 'ac_css_files' ) )
Here are the three original lines:
wp_enqueue_style( 'ac_style', get_template_directory_uri() . '/style.css', array(), '1.0.1', 'all' ); wp_enqueue_style( 'ac_media_queries', get_template_directory_uri() . '/assets/css/media-queries.css', array(), '1.0.1', 'all' ); wp_enqueue_style( 'ac_icons', get_template_directory_uri() . '/assets/icons/css/font-awesome.min.css', array(), '4.0.3', 'all' );
Change them to this:
wp_enqueue_style( 'ac_style', get_stylesheet_directory_uri() . '/style.css', array(), '1.0.1', 'all' ); wp_enqueue_style( 'ac_media_queries', get_stylesheet_directory_uri() . '/assets/css/media-queries.css', array(), '1.0.1', 'all' ); wp_enqueue_style( 'ac_icons', get_stylesheet_directory_uri() . '/assets/icons/css/font-awesome.min.css', array(), '4.0.3', 'all' );
That should end your child’s nightmares!
ciao!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘I believe I found a bug in functions.php’ is closed to new replies.