-
-
Save NorthTexasCreative/24b3a952f0e949a796a3 to your computer and use it in GitHub Desktop.
Force the Genesis Style Sheet to be loaded last: https://gist.github.com/schlessera/592ccdfcd889ad0459f6
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