Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
Automatically enqueue CSS and JavaScript files for ACF Flexible Content blocks
NotificationsYou must be signed in to change notification settings
szepeviktor/acf-flexible-auto-assets
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Automatically enqueue CSS and JavaScript files for ACF Flexible Content blocks.
Here is the plugin ZIPhttps://github.com/szepeviktor/acf-flexible-auto-assets/archive/refs/heads/master.zip
Name your asset handle like this.
add_action('wp',function () {$handle ='acf_flex_' .$field_name .'_' .$block_name;wp_register_style($handle,plugins_url('my-plugin/flex/the-block.css'), [],MY_PLUGIN_VERSION);});
<?php/* * Template Name: My template */wp_enqueue_style('my_css');wp_enqueue_script('my_javascript');get_header();?>
About
Automatically enqueue CSS and JavaScript files for ACF Flexible Content blocks
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.