Archived topic
Loading Stiles Problem
4 replies · Started by CRISTOBAL on October 5, 2017
Good morning,
We are using Types on a webpage, and types load bootstrap AFTER generatepress styles, so styles from Bootstrap prevails over CUstomizer settings.
Is there a way to change this make GP load with prority?
Is there a specific file you're needing to load later?
All styles.
It is WP Types is loading bootstrap after the customized options of GP, so, for example, H1 font size gets overwritten.
Any thougts?
You can see it at cristobalmz.es/arraez
First GP Heading styles are loaded, then Bootstrap, and so I had to force H1 styles with CSS.
You could do this:
add_action( 'after_setup_theme', 'tu_move_scripts' );
function tu_move_scripts() {
remove_action( 'wp_enqueue_scripts', 'generate_scripts' );
add_action( 'wp_enqueue_scripts', 'generate_scripts', 100 );
}
The function name will likely change in GP 2.0, so keep in mind you'll need to tweak the function once that happens :)