• Resolved Alexander Guskov

    (@forcesail)


    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)
  • Plugin Contributor alexgso

    (@alexgso)

    Hi Alexander,

    Thank you for your feedback. We’ll look to allow the stylesheet to be optionally output to the head or end of the body in a future update.

    Kind regards,
    Alex

Viewing 1 replies (of 1 total)
  • The topic ‘SO-CSS-file loads in the footer’ is closed to new replies.