Support

Account

Home Forums Front-end Issues Load Javascript if acf_form is used Reply To: Load Javascript if acf_form is used

  • I need to write something like that for the css ?

    function themeslug_enqueue_style() {
    if ( get_sub_field(‘slider’) ) {
    wp_enqueue_style( ‘parent-stylesheet’, trailingslashit( get_template_directory_uri() ) . ‘style.css’, false );
    }

    }

    add_action( ‘wp_enqueue_scripts’, ‘themeslug_enqueue_style’ );