This action used to enqueue scripts and styles on pages where ACF fields are rendered. Eg: page / post edit screen, front end form, options page, etc.

This action is very similar to the WP action admin_enqueue_scripts.



function my_acf_admin_enqueue_scripts() {
	// register style
    wp_register_style( 'my-acf-input-css', get_stylesheet_directory_uri() . '/css/my-acf-input.css', false, '1.0.0' );
    wp_enqueue_style( 'my-acf-input-css' );
    // register script
    wp_register_script( 'my-acf-input-js', get_stylesheet_directory_uri() . '/js/my-acf-input.js', false, '1.0.0');
    wp_enqueue_script( 'my-acf-input-js' );

add_action( 'acf/input/admin_enqueue_scripts', 'my_acf_admin_enqueue_scripts' );


We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.