Is dynamic data "OR" statement possible?

I want to populate a Title element with dynamic data where it uses a custom ACF field but has a fallback to the Page Title if ACF is empty. Essentially and OR statement

Something like this? {acf_page_banner_heading} || {post_title}.

Is there any way to add a fallback value if the dynamic value is empty?

Hey Jon,

there is no dynamic data fallback functionality in Bricks (yet). But you could use ACF’s format value hook if applicable:

add_filter( 'acf/format_value/name=page_banner_heading', function( $value, $post_id ) {
    return empty( $value ) ? get_the_title( $post_id ) : $value;
}, 10, 2 );

Best,

André

2 Likes

André you’re a rockstar! Thank you!