Support

Account

Home Forums General Issues Checkbox Not Working

Helping

Checkbox Not Working

  • Can anyone explain to me why this isn’t working?

    <?php $colors = get_field('hide_sidebar_menu');
    if( $colors && in_array('red', $colors) ) { ?>
        <h1>Test</h1>
    <?php } ?>

    I have tried this with the return value being to set to value, label and both – neither of which are working?

    It should return the H1 tag ‘Test’ inside the #global-sidebar.

  • EDIT – Fixed, user error 🤦🏻‍♂️

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.