Home Forums ACF PRO Checkbox Array Quit Working


Checkbox Array Quit Working

  • I’ve been using the below code without issue with ACF Pro 5. I moved my site from one VPS to another, and now that code quits working. When it’s in place, every ACF field after it doesn’t show on the page. If I remove it, everything works.

    $values = get_field('badges');
    if(in_array("member", $values )){
    <div class="team-badge">test</div>

    Nothing has changed in the code. If I take the same site and put it on a normal shared host the code works fine.

    Anyone have an idea? Maybe I’m missing a PHP library?

    Thanks for any suggestions!

  • Are you still having a problem with this? I would suggest looking at any difference in php configuration. Put a php file on both sites with


    Make sure everything is configured the same.

  • Here’s the answer to this: In my Debian 8.1 LAMP install, there was a setting turned off in the php.ini file. I’ve never run into that before installing LAMP on Debian.

    The setting: short_open_tag

    That needs to be on. Once I changed and restarted Apache, all was right with the world.

  • Actually, when I saw your example code was using short open tags, that was one of the settings I thought could be different, but thought it would be a good idea for you to check them all. Glad you got it worked out.

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

The topic ‘Checkbox Array Quit Working’ is closed to new replies.