Last active
August 29, 2015 14:18
-
-
Save schlessera/592ccdfcd889ad0459f6 to your computer and use it in GitHub Desktop.
Postpone loading of Genesis Stylesheet so that it trumps the CSS of plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Move Genesis child theme style sheet to a much later priority to give any plugins a chance to load first. | |
* @author Alain Schlesser ([email protected]) | |
* | |
* @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