Custom Dynamic Data Tags in Bricks

It is possible in Bricks to output the value returned by any function via


whilst passing arguments if needed.

Sometimes you may want to add your own items to the "Select dynamic data" list since it is more convenient/easier.

This Pro tutorial provides one way to do this. We shall register a "Parent link" dynamic data tag which when selected sets the hyperlink URL to the parent post/Page of the current post/loop item and if a parent is not present, to #.


Bricks child theme must be the active theme.

Step 1






$classname = 'Bricks\Integrations\Dynamic_Data\Providers\Provider_' . str_replace( ' ', '_', ucwords( str_replace( '-', ' ', $provider ) ) );


This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Instant access to 390+ Bricks code tutorials with BricksLabs Pro