Search
 
SCRIPT & CODE EXAMPLE
 

PHP

acf blocks register block with enqueue script

// ACF Register a testimonial block + enqueue style and js
acf_register_block_type(array(
'name'              => 'testimonial',
'title'             => __('Testimonial'),
'description'       => __('A custom testimonial block.'),
'render_template'   => 'template-parts/blocks/testimonial/testimonial.php',
'category'          => 'formatting',
'render_template'   => get_template_directory() . '/template-parts/blocks/testimonial/testimonial.php',
'enqueue_style'     => get_template_directory_uri() . '/template-parts/blocks/testimonial/testimonial.css',
'enqueue_script'    => get_template_directory_uri() . '/template-parts/blocks/testimonial/testimonial.js'
));
Comment

PREVIOUS NEXT
Code Example
Php :: Deprecated: WC_Product::get_dimensions error fix 
Php :: larvel still laod the local file location on production 
Php :: how to conditional values in old value or edit new value with validsation faild to redirect back in laravel 
Php :: remove the public from url in laravel 
Php :: show all tags 
Php :: Deutsch korrektur 
Php :: 0 == "string" php 
Php :: how to get create table query preview in phpmyadmin 
Php :: check which php.ini file enabled from code 
Php :: laravel select error 
Php :: undefined variable require_once 
Php :: PHP Superglobal - $_POST 
Php :: title active php 
Php :: Debloat Wordpress 
Php :: Maintenace Mode Up using cron 
Php :: Laravel docker-compose 404 not found Nginx 
Php :: laravel connection timed out 
Php :: laravel store mail driver info in database 
Php :: doctrine findby regex 
Php :: Get and access to the order data properties (in an array of values): 
Php :: Laravel/Php Carmel Casing / Title Casing 
Php :: Lavavel nova toggle 
Php :: laravel validate array input 
Php :: ass 
Php :: laravel model undefined property 
Php :: laravel pdf generator 
Php :: php post data empty 
Php :: how to implement email verification in laravel 
Php :: laravel seeder multiple column 
Php :: laravel transaction 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =