1. Home
  2. Docs
  3. WordPress Studio Framework
  4. How-To…
  5. Enqueue Custom CSS/JS

Enqueue Custom CSS/JS

if ( ! function_exists( 'wpsf_add_custom_css' ) ){
  function wpsf_add_custom_css() {
    wp_enqueue_style( ... $arguments );
    wp_enqueue_script( ... $arguments );
  add_action('wpsf/enqueue', 'wpsf_add_custom_css' );

Note: you will still enqueue the style or script the normal way WordPress does it. (Don’t just leave the … in the code… you need to fill out the rest of the information). The big difference is that you can hook it into the wpsf/enqueue hook to include your custom CSS/JS in the framework.

Was this article helpful to you? Yes No

How can we help?