Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save srikat/052b16174a20b260b505 to your computer and use it in GitHub Desktop.
Save srikat/052b16174a20b260b505 to your computer and use it in GitHub Desktop.
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