This will get you the choices array inside $field
variable:
$choices = $field[ 'choices' ];
From there, you can iterate with either a while or foreach loop depending on what you are trying to do with the array.
EDIT: rereading your question, you specify what you are trying to do! Sorry for skipping that part!
echo '<ul>';
foreach($choices as $key => $choice):
echo '<li>' . $key . ' and ' . $choice . '</li>';
endforeach;
echo '</ul>';
Should produce:
- orange_county and Orange County
- los-angeles and Los Angeles
This should not be considered complete code. Escape your output for security’s sake. Just illustrating a concept here.
Related Posts:
- Order by & include array by specific post ids
- Get list of all registered post types slugs
- Limit the post for differents custom post type in the same wp_query
- array_pop() expects array, boolean given for $event_type_term ->slug
- Save custom post type in different table
- Automatically adding meta data to posts or multiple query help
- Create a post in custom post type using field in registration form after users submit form
- My theme saves their custom post type’s metadata as a serialized array, how to access the keys?
- Save an array from drop-down in custom meta box
- Get parse_query filter to return slug instead of id
- How to store multiple values in 1 meta_key with radio input?
- Display a CPT based on a metabox selection
- Display post content with respect to its title?
- Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
- Limit the post for differents custom post type in the same wp_query
- Custom Post Types — $args vs. labels array
- Get an array wich contains the post_name of every post that has the custom post_type “pelicula”
- Add first letter of titles to array, then compare arrays
- Query Custom Post Types with checkboxes
- Create Array from custom post type to display a slider
- Inefficient Query Confusion
- Querying multiple values from a single key
- Check if user has comment on current post
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- How do I disply an array inside a custom post type?
- Getting custom post types to properly display alphabetically
- How can I loop at a Specific Taxonomy from a custom post type?
- Update value inside array update_post_meta
- Custom archive page for custom taxonomy and pagination issue
- Get an array of the number of post per year of a custom post type (WordPress)
- Query when is one or several values
- Create Post Types from a XML url (Real Estate website)
- Staggering featured post using ‘sticky’
- If custom taxonomy exist on post?
- Convert Custom Post Data to Javascript Array for Autocomplete
- Trying to get custom post type attachment images to function in indexed array
- CPT and metabox: create multi checkbox by using array?
- getting a blank login page :( any way I can fix this without having to do a clean install?
- Pulling in Related Posts based on Post Type array
- WordPress custom field images not getting inserted into array
- Meta-Box to add multiple items one at a time and on publish save all
- Custom Post Type Author Array Problem
- taxonomy terms array not working
- Display custom posts in checkbox list
- posting twice from an array?
- create functions based on array values
- How to create a job post by email parsing? [closed]
- Display custom post type attached media file sizes
- post__in select all custom posts and not the selected array of ids
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Creating Sections for Post Types
- Give each post type label a different color?
- page not found for single-type.php file
- Show list of custom posts with respective attachments?
- How to output an image or icon for selected check box in a custom post
- Check IF single OR multiple custom data has been entered
- Set a hard-coded page-template (post-type-archive) as home/front-page of my wordpress blog?
- How To Get Custom Post Type Category Title
- populate array with posts
- Displaying tags associated with posts in Custom Post Type
- Display custom posts randomly in custom taxonomy archive
- Using custom post type as taxonomy
- Transferring data to the end of a transaction with the Shopp Plugin
- Listing custom post types on archive page with array
- get_pagination not working on a custom post type query (using WP_Query)
- Show Posts to Author Only
- How to Make infinite loop of post
- Get custom post type categories to show up in menus
- WP_Query parameter conflict
- Create a comments template for custom post types
- Is it possible to add posts and images (auto resize) for custom post types with a script?
- wysiwyg editor don´t export paragraph
- Add custom attributes to a post
- Custom Type add Transitions
- How to make a meta box?
- Retrieving meta-box from a custom-post-type
- Cannot save Custom Post Type meta data
- Custom taxonomy page returns 404
- Custom post type permalink sends to 404.php
- Running a wordpress action when a custom post type term (taxonomy category) is changed
- Custom post types with categories in template
- portfolio custom type tags support
- Custom Post Type conflicting with page?
- How to check if post/page or taxonomy post is published by admin
- How can I create an automatic drop down menu with my tags?
- Custom database table question
- previous_post_link in same taxonomy in custom post type
- Getting all ID’s matching a title in a custom post type
- show current item in custom menu, when inside a custom post type
- How do I get the custom category URL from the custom post type?
- Associate all Custom Post Types with Taxonomy
- current-menu-item not added on page showing custom post type (rendered with archive template)
- How to define a term for custom taxonomy
- Saving fields in a drop-down in WordPress
- How to move a post to different post type with all meta data?
- Custom taxonomy or custom page templates?
- Make (custom) post type accessible only by custom query
- Assign post type to many users
- Custom taxonomies to define versions of a product
- WP_Query with custom post type ID