Support

Account

Home Forums ACF PRO ACF Blocks: how to apply backend styles different from the frontend ones? Reply To: ACF Blocks: how to apply backend styles different from the frontend ones?

  • I can answer by myself.

    To load styles only for backend, you can use the enqueue_block_editor_assets action:

    
    add_action('enqueue_block_editor_assets','add_block_editor_assets',10,0);
    function add_block_editor_assets(){
      wp_enqueue_style('block_editor_css', [yourpath] . '/editor-blocks.css');
    }