ACF is actually doing what it should – storing a numerical array of selected values. If you want the label you can levy get_field_object
, which returns information about the custom field (rather than the value of it for the given post).
$field_obj = get_field_object( 'nav_widget_platforms' );
$platforms = get_field( 'nav_widget_platforms' );
foreach ( $platforms as $platform ){
echo $field_obj['choices'][ $platform ] . ": $platform<br />";
}
Related Posts:
- Can an array be used as a meta_query value?
- How to write PHP array to render JSON-LD Markup for Job Postings, with ACF
- How can I add multiple ‘tax_query’ arrays via a loop?
- Changing a specific value inside a complex repeater/flexible content field (ACF)
- Redirect to another page using contact form 7? [closed]
- Advanced Custom Fields – display label and value only if value entered
- Check for image with same filename but different extension
- Conditional multidimensional arrays and array_map
- Trying to select 1 item from an array
- How can you query posts by advance custom field when the value is a serialized array? [closed]
- ACF – Get ID of relationship field in flexible content
- Help using an array in ‘exclude’ key of another array
- Convert number to date format within an array
- Make sticky post with FacetWP
- Display a single row from nested array of custom field data
- Page returning ID from array, how to return the correct values for post in acf wordpress
- Array sorting by custom field date
- Getting “Invalid argument supplied for foreach()” Warning
- Using ACF custom field for custom post type to order categories
- Custom WordPress Function – Adding items from Foreach Loop into an array and Updating Field based on array of IDs (ACF + WooCommerce)
- How to get permalink and title from post ID?
- update_post_meta and update_field ony working when saving the post
- Metabox repeating fields – radio buttons not saving correctly
- How can merge two arrays values in one array and save in database
- WP REST API: Order posts by meta value (acf)?
- Get the label from ACF checkbox [closed]
- Advanced Custom Fields Image Field returning ID instead of URL [closed]
- Query pages for use of a flexible content layout
- ACF repeater field with meta_query
- List of posts by day of the week
- ACF Plugin – Random Gallery Image with wp_get_attachment_image()
- Sorting custom admin column by value
- ACF check if variable has http, if else return string
- Update post meta value as date difference between two fields
- get_*_meta doesn’t always return an array
- ACF: how do I get the fields and its values of a specific group?
- Reprinting tags with all attributes
- get all posts in custom post type by ACF field value
- Remove the first 5 characters of the_title and orderby that
- Checking array against author id in loop
- html element to separate php variable strings – ACF datepicker
- Grouping posts by a custom meta value
- If/Else Statement for Advanced Custom Fields
- Search and replace not working for ACF Images
- Loop over Array and get the distinct ids
- Remove empty terms from array, sort alphabetically, update back to repeating field
- Only show first image in foreach loop
- Query entries from custom post type in an ACF flexible content field
- Hidden field in acf
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- Filter by field with array value in ACF on WP REST API
- Strip comma from last element in concatenated JSON string
- Add key and value to an array in another file
- add the value of a variable returned in a while loop [closed]
- Sorting the portfolio by an ACF? [closed]
- How to change the background color of my header dynamically based on a Custom Posts types color value?
- TinyMCE’s “Clear Formatting” button doesn’t remove lists and headings
- Can I use WP blocks in a template?
- Set post publish date by custom field
- Use Acf Repeater data as options for a different acf custom select field
- ACF get group fields from current post taxonomy
- WordPress – display relationship between blog posts and custom posts
- Transitioning Laravel App into WordPress (Portfolio Website)
- make p tag collapsed after 3 rows
- Load info from customposttype into template page
- ACF – Can’t get custom post type by taxonomy
- ElseIf Statement with ACF Group field
- Creating permissions rules with ACF repeater field
- Replace an array (with identical values) with another array in the_content
- Get list of posts from attachment
- Scheduling a post using publish date from a custom field. Resulting post is set as published in the future instead of scheduled
- How to pass get images in homepage also in portfolio page?
- Plugin error “array_key_exists(): The first argument should be either a string or an integer” [closed]
- ACF order relationship by date
- Cant get unique_array() work on get_the_category() foreach loop
- How to create an ACF shortcode with Repeater Field in WordPress functions.php?
- Generate custom sized images from certain images in media library
- ACF Images If/else
- How to use an ACF taxonomy relationship field as part of the URL structure for a custom post type?
- wp_insert_post with advanced custum fields repeater
- Only list category if it has a custom field image
- How do I use foreach to get content from a custom-field in multiple posts?
- $wpdb->get_results in not an array
- WordPress custom field images not getting inserted into array
- Unserializeing multiple column values that are stored in one database results variable
- Time sort with meta_key using UNIX timestamp failing due to date differences
- the_post_thumbnail unless video id is added
- get_permalink returning first letter
- Insert dynamic content into posts
- How not to strip leading zero in advanced custom fields
- ACF: Hide a div or template section when a custom field (in a field group) is empty
- update_field() with repeater fields issue [closed]
- ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?
- Advanced Custom Fields Image Crop
- Display ACF field only if value is greater than 0
- How to use ACF repeater? [closed]
- Updating post object via ACF breaks front-end
- Custom headings on WYSIWYGs per flexible content module in ACF
- How can I get values from a custom post type depending on where I click on my SVG map?
- Pending posts showing category until published