WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Tommy White
    Member
    Posted 1 year 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; ?>

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

  • Tommy White
    Member
    Posted 1 year ago #

  • Topic Closed

    This topic has been closed to new replies.

    About this Plugin

    About this Topic

    Tags

    No tags yet.