• Resolved tatof

    (@tatof)


    I’m updating my base theme to the block.json way of working. But now i have the problem all my block styles are loaded inline above style.css in the header.

    Style.css is loaded with “wp_enqueue_style” -> “wp_enqueue_scripts”

    Block inline-css are loaded through the block.json

    How do I switch this? All wp_enqueue_scripts should go above the block inline-css blocks.

    • This topic was modified 2 years, 7 months ago by tatof.
Viewing 1 replies (of 1 total)
  • Thread Starter tatof

    (@tatof)

    Stupid me… needed to add the priority in the add_action hook.

    add_action( 'wp_enqueue_scripts', 'footer_scripts', 5 );

    This way my style CSS is loaded earlier then the inline-css from the blocks.

    • This reply was modified 2 years, 7 months ago by tatof.
Viewing 1 replies (of 1 total)

The topic ‘head block inline-css after theme style.css’ is closed to new replies.