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