Advanced Custom Fields
[resolved] How to output an Array of options selected (2 posts)

  1. Tommy White
    Posted 3 years ago #

    I love this plugin! Can someone tell me how I can output in my theme for custom fields with multiple options selected to parse correctly?

    I have a field called average_cost and it's defined as a checkbox with the options $:$ $$:$$ $$$:$$$. When I select more than one all I get on the front end is Average Cost: Array. If only one is selected it appear correctly.

    My current code:
    <?php if(get_post_meta($post->ID, 'average_cost', true)): ?>

  2. <?php echo get_post_meta($post->ID, 'average_cost', true); ?>
  3. <?php endif; ?>


  • Tommy White
    Posted 3 years ago #

  • Topic Closed

    This topic has been closed to new replies.

    About this Plugin

    About this Topic


    No tags yet.