Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Child Theme Style Sheet Being Called Twice

         

Planet13

5:41 pm on Nov 13, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi everyone:

My child theme style sheet is being called twice by wordpress.

When I view source, I see it called once from:

<link rel='stylesheet' id='divi-style-css' href='http://www.example.com/wp-content/themes/Divi-child/style.css?ver=2.2' type='text/css' media='all' />


and also being called once from:

<link rel='stylesheet' id='child-style-css' href='http://www.example.com/wp-content/themes/Divi-child/style.css?ver=4.0' type='text/css' media='all' />


I don't know why it is being called twice, and I don't know why one time it has ?ver=2.2 appended and one time it has ?ver=4.0 appended to the URL.

I am using the Divi theme.

The child theme is in a folder named /Divi-child


My child style-sheet starts out like this:

/*
Theme Name: Divi Child
Description: Divi Child Theme
Template: Divi
*/


Any suggestions are appreciated

Planet13

10:25 pm on Nov 13, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Turns out, Wordpress had the wrong code in their codex for wp_enqueue_style()

MPORTANT NOTE: Everyone that used the previous code, it loads the child stylesheet twice. This was brought up by this post [link].


The good news is that the codex has been updated, so if you are looking for the proper way to implement a child theme, then you can find it here:

[codex.wordpress.org...]

Hope this helps.