• Hello,
    I have created a twenty eleven child theme following the new “best practice” method (via functions.php – though the same happens when I use @import). Now some of the css in the child theme stylesheet does not work (some do, though). When I use Firebug and deactivate the style listed first in the firebug overview (which is the parent theme css), it does work.
    When I check the header html in Firebug, the parent style css is called last, way below the child theme css. Normally it should be the other way round, right? What am I doing wrong?
    This is the page I’m working on.
    I’d really appreciate if someone could help me with this. THANK YOU!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Same problem here! Help!

    Hey, @knuppi, looks like there’s glitch on WP4.5.

    AFAIK at this moment, WP (in its core) includes a class “singular” to the themes and it breaks formatting.

    The devs appear to be looking into it. While they don’t release a WP fix, you could use a workaround (it’s working fine to me). Just add this to the end of your theme’s functions.php:

    function wp36510_remove_singular_class( $classes ) {
    	$index = array_search( 'singular', $classes );
    	if ( false !== $index ) {
    		unset( $classes[ $index ] );
    	}
    
    	return $classes;
    }
    add_filter( 'body_class', 'wp36510_remove_singular_class' );

    Source: Ticket #36510.

    Thread Starter knuppi

    (@knuppi)

    Hey José,
    thanks a lot!!
    This definitely helps, and I can remove all the !important – it also resolved a strange layout issue I kept for later, so thanks here, too :).
    Would you let me know when a WP fix is released?
    Have a great day!
    Sonja

    According to Ticket #36510, this fix will be on the core. I think we may expect a new minor version of WP in the next few days…

    Hey José,

    thanks a lot. Thumbsup!!

    Michael

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Twenty Eleven: parent theme css overrides child theme css’ is closed to new replies.