[wp-trac] [WordPress Trac] #39997: Loads of child style.css using version of parent
WordPress Trac
noreply at wordpress.org
Wed Mar 1 13:03:50 UTC 2017
#39997: Loads of child style.css using version of parent
-------------------------------+------------------------------
Reporter: parsmizban | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version: 4.7.2
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: template
-------------------------------+------------------------------
Comment (by pothi):
My apologies to close the ticket prematurely.
Can you please post the content of your child theme's style.css file and
functions.php file?
If functions.php file is empty, well, you don't need to share it.
Btw, here's the live demo of a site that uses a child theme for
TwentyFifteen theme... wp.tinywp.com
The content of my child theme's style.css is...
{{{
/*
* Theme Name: TwentyFifteen Child
* Template: twentyfifteen
* Version: 1.0.0
*/
}}}
In my case, style.css file of the parent theme is '''correctly'''
overridden by the child theme, as the parent theme's functions.php
contains the following code...
{{{
/**
* Enqueue scripts and styles.
*
* @since Twenty Fifteen 1.0
*/
function twentyfifteen_scripts() {
// Add custom fonts, used in the main stylesheet.
wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(),
array(), null );
// Add Genericons, used in the main stylesheet.
wp_enqueue_style( 'genericons', get_template_directory_uri() .
'/genericons/genericons.css', array(), '3.2' );
// Load our main stylesheet.
wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );
// Load the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() .
'/css/ie.css', array( 'twentyfifteen-style' ), '20141010' );
wp_style_add_data( 'twentyfifteen-ie', 'conditional', 'lt IE 9' );
// Load the Internet Explorer 7 specific stylesheet.
wp_enqueue_style( 'twentyfifteen-ie7', get_template_directory_uri() .
'/css/ie7.css', array( 'twentyfifteen-style' ), '20141010' );
wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' );
wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix',
get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(),
'20141010', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments'
) ) {
wp_enqueue_script( 'comment-reply' );
}
if ( is_singular() && wp_attachment_is_image() ) {
wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation',
get_template_directory_uri() . '/js/keyboard-image-navigation.js', array(
'jquery' ), '20141010' );
}
wp_enqueue_script( 'twentyfifteen-script',
get_template_directory_uri() . '/js/functions.js', array( 'jquery' ),
'20150330', true );
wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array(
'expand' => '<span class="screen-reader-text">' . __( 'expand
child menu', 'twentyfifteen' ) . '</span>',
'collapse' => '<span class="screen-reader-text">' . __( 'collapse
child menu', 'twentyfifteen' ) . '</span>',
) );
}
add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
}}}
So, can you please share your style.css file and functions.php file (if it
is not empty)?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39997#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list