Using Conditions to display sections

I created the following snippets

function by_header_notice() {
	$notice = get_field('header_notice', '950');
	if ($notice) {
		return 'true';
	}
}

function by_footer_notice() {
	$notice = get_field('footer_notice', '950');
	if ($notice) {
		return 'true';
	}
}

Using CodeSnippets and activating it, I want to hide or display a notice banner in the header and footer, depending if content is provided (ACF Fields).

The fields itself and display without conditions are working, but I cannot get the conditional setup to run.

I set up a condition on the section that is:
Dynamic Data
{echo:by_header_notice}

true

the output seems to be false, as it is not displayed. When I remove the condition i see everything as it should be. So for some reason the condition does not execute the function maybe?

I am using RC2 currently

If that acf field is filled and emptied when it needs to display something, a “is empty condition” might just work. The condition need to check out to show it so “is not empty” should just work.

The field has to be some static field like an option page or so.

The builder will get something to display, but you might need a query attached to pull the field even though its just 1 field.