Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Force the Genesis Style Sheet to be loaded last: https://gist.github.com/schlessera/592ccdfcd889ad0459f6
<?php
/**
* Move Genesis child theme style sheet to a much later priority to give any plugins a chance to load first.
* @author Alain Schlesser (alain.schlesser@gmail.com)
*
* @see http://docs.garyjones.co.uk/genesis/2.0.0/function-genesis_load_stylesheet.html
*/
function as_postpone_genesis_stylesheet() {
// set very high priority for the enqueue action
$priority = 999;
// re-enqueue with high priority
remove_action( 'genesis_meta', 'genesis_load_stylesheet' );
add_action( 'wp_enqueue_scripts', 'genesis_enqueue_main_stylesheet', $priority );
}
add_action( 'genesis_setup', 'as_postpone_genesis_stylesheet' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.