Skip to main content
VelinStyle v1.3.0
⌂ Home
  1. Docs
  2. Guides
  3. WordPress

WordPress 1.2.2 beta

Enqueue VelinStyle CSS and the components IIFE from your theme or plugin with wp_enqueue_style and wp_enqueue_script. Deutsch

Maturity: Integration recipe is beta in 1.2.0. CSS / Web Components / runtime remain stable. Studio and the complete Utility Engine stay planned.

When to use

When not

Options

Enqueue

add_action('wp_enqueue_scripts', function () {
  $ver = '1.2.0';
  wp_enqueue_style('velinstyle', get_stylesheet_directory_uri() . '/assets/velinstyle/velinstyle.min.css', [], $ver);
  wp_enqueue_script('velinstyle-components', get_stylesheet_directory_uri() . '/assets/velinstyle/velinstyle-components.iife.js', [], $ver, true);
});

Block editor

The editor does not load frontend CSS automatically. Use enqueue_block_editor_assets if you need WYSIWYG parity.

Icons

Use an absolute sprite URL: get_stylesheet_directory_uri() . '/assets/velinstyle/velin-icons.svg'