Community Forums › Forums › Archived Forums › General Discussion › CSS not enqueued to bottom of styles
Tagged: child theme, css, enqueue
- This topic has 6 replies, 3 voices, and was last updated 9 years, 8 months ago by D. van de Kamp.
-
AuthorPosts
-
May 21, 2015 at 1:01 pm #153130D. van de KampParticipant
How do I get my child theme css to be loaded last. I've installed some plugins, but their css appears after my custom css in the head section, so changes in my css don't have any effect.
I'd appreciate any help thanks.
I'm working local, so I don't have a url, I' m sorry
http://www.donthaveoneyet.nlMay 21, 2015 at 7:57 pm #153178Brad WestMemberThis is how I do it:
remove_action( 'genesis_meta', 'genesis_load_stylesheet' ); add_action( 'wp_enqueue_scripts', 'genesis_enqueue_main_stylesheet', 15 );
I originally found this on Carrie Dils's site: http://www.carriedils.com/woocommerce-genesis-important-style/
May 22, 2015 at 2:30 am #153222D. van de KampParticipantHi Brad,
Thanks for your reply. This way I can pass all the stylesheets, except for two plugins: event-list and responsive slider. Even when I use a value of 500 instead of 15. Weird, isn't it. Any ideas on that?
May 22, 2015 at 2:34 am #153223GrahamMemberYou might be swimming against the tide there...
Other plugins add their CSS on even later hooks. Genesis Tabs and jetpack come later too
Could you not make your CSS more specific than theirs in those instances?
My JustGiving page: https://www.justgiving.com/helping-graham-give
May 22, 2015 at 2:39 am #153224Brad WestMemberUnfortunately I don't have any idea why those plugins would be acting different than the others; especially if you moved the priority up to 500. Are they being output in the footer or inline? If not perhaps you could contact the plugin developer and ask how they're outputting their stylesheets.
May 22, 2015 at 3:02 am #153226D. van de KampParticipantThey are in the head section.
</style>
<link rel='stylesheet' id='open-sans-css' href='//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.2.2' type='text/css' media='all' />
<link rel='stylesheet' id='dashicons-css' href='http://localhost:8888/devlab/wp-includes/css/dashicons.min.css?ver=4.2.2' type='text/css' media='all' />
<link rel='stylesheet' id='admin-bar-css' href='http://localhost:8888/devlab/wp-includes/css/admin-bar.min.css?ver=4.2.2' type='text/css' media='all' />
<link rel='stylesheet' id='google-fonts-css' href='//fonts.googleapis.com/css?family=Titillium+Web%3A400%2C600%2C300%2C700%2C300italic%2C400italic&ver=2.1.2' type='text/css' media='all' />
<link rel='stylesheet' id='upw_theme_standard-css' href='http://localhost:8888/devlab/wp-content/plugins/ultimate-posts-widget/css/upw-theme-standard.min.css?ver=4.2.2' type='text/css' media='all' />
<link rel='stylesheet' id='genesis-sample-theme-css' href='http://localhost:8888/devlab/wp-content/themes/devlab/style.css?ver=2.1.2' type='text/css' media='all' />
<link rel='stylesheet' id='event-list-css' href='http://localhost:8888/devlab/wp-content/plugins/event-list/includes/css/event-list.css?ver=4.2.2' type='text/css' media='all' />
<link rel='stylesheet' id='slider_styles-css' href='http://localhost:8888/devlab/wp-content/plugins/genesis-responsive-slider/style.css?ver=0.9.2' type='text/css' media='all' />May 22, 2015 at 3:18 am #153227D. van de KampParticipantBut you are right, I'll contact the developers. Thanks for your time Brad.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.