SO-CSS-file loads in the footer
-
Hello,
I found that so-css file loads in the footer that rerenders the page.
I suppose that it happens because plugin register the script after WP print them out in wp_head.
So, it would be much better, if you changed:
add_action( ‘wp_head’, array( $this, ‘enqueue_css’ ), 20 );to:
add_action( ‘wp_enqueue_scripts’, array( $this, ‘enqueue_css’ ), PHP_INT_MAX );PHP_INT_MAX – sets so-css file in the end all styles in header that is the best position for correcting scripts like so-css.
I tested, it works fine.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘SO-CSS-file loads in the footer’ is closed to new replies.