-
Add the file
dynamic-acf-icon.php
to the folder elements in your Bricks Child Theme. -
Inside your
function.php
file, add the following code:/** * Register custom elements */ add_action( 'init', function() { $element_files = [ __DIR__ . '/elements/dynamic-acf-icon.php', ]; foreach ( $element_files as $file ) { \Bricks\Elements::register_element( $file ); } }, 11 );
-
Create a new ACF field Image (e.g. Featured Icon)
-
Set the Return Format to Image Array.
-
Open Bricks Builder and add the new element Dynamic ACF Icon.
-
In the element settings, select your ACF field name (e.g. featured_icon) as the dynamic data field
-
Style the icon