Support

Account

Forum Replies Created

  • Solved!

    By referencing this page: http://www.advancedcustomfields.com/resources/checkbox/

    I noticed the code for displaying multiple values on the frontend is:

    <?php echo implode(‘, ‘, get_field(‘field_name’)); ?>

    So simply by using this but removing the comma it displays the multiple selected values but without adding a comma between each.

    <?php echo implode(‘ ‘, get_field(‘field_name’)); ?>

    I hope this helps someone else!

  • Thanks for the reply mediawerk but that’s not the case. Initially I had all the images display normally before making them optional using ACF. There were no commas then. The commas have appeared only since using ACF to display the images and I’ve checked all code and values for stray commas – there are none.

    It seems to me as though ACF is more geared towards displaying text, and somehow separates each text value with a comma automatically. This is useful but not when the values are images rather than text.

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