This can easily be done with default PHP functions.
// Loop through all fields, grab the content and assign it to a new array
foreach ( get_post_custom() as $custom )
$new_custom[] = array_shift( $custom );
// Get rid of empty fields
$new_custom = array_filter( $new_custom );
Related Posts:
- WordPress Action Hooks and Post ID?
- get_post_meta of multiple posts?
- Can wp_query return posts meta in a single request?
- How can I get the post ID from a WP_Query loop?
- How to edit a post meta data in a Gutenberg Block?
- Can I count the number of users matching a value in a multiple value key?
- Auto sort the wp-admin post list by a meta key
- meta_query where value is equal to given value
- How to update/delete array in post meta value?
- Get updated meta data after save_post hook
- How do I retrieve multi-dimensional arrays from the wp_postmeta table, & display on a website?
- WordPress altering my custom query, How to fix it?
- adding a URL to a post meta
- ajax delete value from custom field array
- How can update custom meta for all posts
- Adding meta data to an attachment post
- How to get custom field image url of specific size
- Problem With Order Item Meta In Woocommerce
- Author Page Custom Query WHERE author OR [post meta value] OR [post meta value]
- What Is meta_id In wp_postmeta?
- How to display Meta Field Value?
- Make the checkbox meta field checked by default
- How to add meta data to WordPress posts?
- How to update Post Meta values through the comment system
- how to interconnect custom post types?
- Filtering multiple meta_values
- How add post_meta from user_meta?
- How can I get my iFrame to work with url from post_meta?
- Group WP_Query by meta_key date
- How do I use wp_query for WordPress search?
- Nav Menu – Add class based on meta keys
- How to use update_post_meta() function properly?
- Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
- Fetch Record based on meta key dates
- How to display post view count by date, week and month?
- How can I filter posts when the meta_value is a serialize object?
- Get User Post if Private
- How to receive all the meta information of a post ?
- Unknown characters added to meta data values
- Compare old meta with new post meta
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- get_post_meta($post->ID) returns empty string when in preview mode of custom post type
- Importing Data from a Non-WordPress database, into WP
- need to add add user names to the post for later retrieval or removal
- Like & Dislike functionality using JavaScript
- Unique meta_key with array value vs repeated meta_key with single values
- Is it possible to retrieve all posts with a certain value for metadata?
- get_permalink vs the_permalink
- Updating my Post when expiry date is past
- How to remove Date from Meta Description on SERP?
- Allow only one post with specific meta value
- How to display sql query fired by posts_where
- Unfiltered html with update_post_meta
- How to validate select field in post meta?
- get meta value from page query
- How to display childrens custom fields?
- how to display custom fields of post on a web page
- How do I query the title (or handle?) of post meta fieldset (created with Simple Fields Plugin)
- why after saving meta value it’s saving all the values the one that i clicked?
- How to fill custom fields with brackets in their key with add_post_meta()?
- How to store multiple custom meta box
- How can I output WPAlchemy repeating fields meta values in my page template?
- put saved metabox values back into fields and then display on the front end
- How to get custom image field of specific post id
- Displaying the ‘time ago’ for recent activity within a post/custom post type?
- add post meta front end edit
- How to query and update one colum in postmeta table?
- How to remove date from showing in meta description
- How to save HTML data into SQL post_content column
- update post meta value with other post meta value
- How can I change author of posts to the value of one of the custom field of the posts?
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Check For get_post_meta on Author Archive Page
- Negative meta_query if storing multiple post_meta values with shared meta_key
- What format is this and how to get value “lal” and “pila” from it
- Frontend query and does not need to log in [closed]
- Get data from custom table and update relative post_meta based on meta_key
- How to save a meta_value as a numeric value after I retrieve it via update_post_meta?
- Saving Custom Field that includes Quotation marks
- Post meta data not showing in frontend, until hitting ‘update’ button
- searching by keywords in post’s metas or pagination links problem
- Programatically delete several attributes in _product_attributes in post meta
- Get post meta after insert post
- update meta field value after
- Data not displaying in text field
- How do I extract the contents of a CPT’s custom field for all posts?
- Meta key in wp_query bug?
- WP-API + JS Backbone client – how to update post meta
- Delete custom post type metadata without deleting the post in admin area
- Echo out custom fields in comments
- Display Data From This Custom Media Upload Meta Box?
- Save values generated via API as custom meta fields
- Proper Way to Sanitize Meta Input
- update_post_meta returning false when called during init
- Sorting Posts with meta value not working
- update_post_meta not working in action hook
- Cache metadata for set of posts
- How do i output images from URL’s added to the same custom field key
- add multiple values (array) to post meta_input
- Problem with get_post_meta