Support » Plugin: Advanced Custom Fields » [Plugin: Advanced Custom Fields] How to output an Array of options selected

  • Resolved Tommy White

    (@twdesigns)


    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)): ?>

  • <?php echo get_post_meta($post->ID, ‘average_cost’, true); ?>
  • <?php endif; ?>

    http://wordpress.org/extend/plugins/advanced-custom-fields/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Advanced Custom Fields] How to output an Array of options selected’ is closed to new replies.