As @TheDeadMedic mentioned the API will exclude any meta with underscore. It’s not a good idea to remove the underscore as it might break something in your code or dependencies, however you can try adding a code like this in your functions.php to unprotect the desired meta
add_filter( 'is_protected_meta', 'wp692_meta_unprotect', 10, 2 );
function wp692_meta_unprotect( $protected, $meta_key ) {
return $meta_key == '_company_phone' ? false : $protected;
}
Related Posts:
- Filter by custom field (meta_key) using JSON API
- Getting Custom Fields from WordPress JSON API [closed]
- How to add custom_fields value in JSON API using create_post
- Is there a way to set default custom fields when creating a post?
- Underscores in custom fields
- Add custom field to the archive page?
- Show only posts which can be commented OR have custom meta field
- Need small coding with Custom Fields Search
- Adding Custom Field to Taxonomy Input :Panel
- How do I make a custom field choose an image?
- get_post_meta() unserialize issue – returns boolean(false)
- How can I remove fields in the attachment editor?
- Unable to get Preview of Uploaded image within a Custom Meta box
- Edit Custom Database Tables in WordPress
- How to store the value of a custom field dropdown select for post referencing?
- Custom bulk action for media gallery items
- Change content before writing to database
- post meta data clearing on autosave
- WordPress Search Custom Meta Field Only
- Query Problem – Show posts within category ‘x’ that have a custom field between ‘y’ and ‘z’
- Localized Date Format for Custom Field
- Add description text under input field for new profile fields
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- Saving custom image meta fields
- Echo values from custom field outside loop php
- How to add content at the end of posts?
- Get all posts that do not have a specific custom field without using a subquery
- Transfer self made functions.php custom fields to Advanced Custom Fields [closed]
- Complex WP_User_Query call fails on production server
- Where did the Add New Custom Field go?
- Sorting WordPress Posts via Custom Field Values?
- Will loading too many ACF Fields cause slow down?
- Admin meta Image Path
- Using PHP to read WordPress Posts
- Auto Populate Custom Field with Complex Value That Increase by One?
- Extra option in editor
- Custom field not updating when value is empty
- Can’t get metabox value (a url) returned using WPAlchemy
- Syntax highligting for custom fields
- Displaying a checkbox array from advanced custom field
- Display custom field values from posts on frontpage
- WordPress: custom field display twice
- meta_compare seems to be treating values as strings instead of integers as expected
- How to create a dropdown select of all items in an ACF field group
- Trying to sort and display categories(not posts) by custom field: ‘order’
- Show user info in a hovercard [closed]
- Shortcode To Display Post Custom Field Value in Post Title, Post Content
- edit_tag_form_fields is depricated but tag_edit_form_fields doesn’t work
- How to make a customized user registration form using the built in wp-register() template tag
- Link FROM attachment to full post and get custom fields values on attachment page?
- Iterate through users and display users meta info at front-page
- Getting the Featured image URL and inserting it as Custom Field on Post update / publish
- Adding custom field and querying from post table
- How to display a product features dynamically with icons?
- How to copy data from a custom field to the post_content?
- Pass PHP through redirect and custom fields
- How can I create a profile field group that the user can’t see?
- Custom field as featured image caption
- Update custom field values on edit address page woocommerce
- Is there a (sane) way to get all custom fields for a post, which do not have a leading underscore?
- Custom field image to Featured Image
- Show array of meta_value in Edit Post Coloum
- custom filed from post in the side bar
- Working with multiple values and metaboxes
- Unable to select image with custom field
- Rewrite comment form post ID on submit
- Add a custom field to my custom post type and then get posts which are before the given date in the custom field
- Move the metaboxes to the very top of post editor
- Custom User Dashboard
- WordPress Rest API custom field not updating till i manually update the post
- search based on custom field
- Custom Fields not working properly
- Custom meta POST request fired twice when updating a post in Gutenberg
- add meta box considers the selected option as post parent
- Custom fields multiple commas separated values
- How do I display a custom field in an existing form on the front end?
- Add custom field information to source meta data
- How to save array option as text and not integer?
- Delete custom meta
- Extend WP_User_Query or WP_User to return all custom fields?
- Quicktag button to automatically add a custom field to a post
- Display custom fields only if it has a value
- WordPress taxonomy child image
- Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
- Add nofollow to custom field link and make domain exceptions?
- wordpress simple post multi rating with post_meta and user_meta
- Custom fields are not displaying in page with multiple loops
- Add class from custom field into widget class
- Download stuff after filling fields?
- Get multiple posts with some custom fields efficient
- Adding custom field to Lightbox in header only pulls current page data, not Lightbox item data
- Meta boxes not displayed, data isn’t being saved
- Custom fields / meta box output
- Custom registration form and custom field
- Get single image from custom fields made with WCK custom fields creator
- How to add google map to custom field
- How can i put a custom field inside this php
- Truncating characters in Advanced Custom Fields works some places but not others?
- Conditional display based on ACF checkbox
- How to add an ACF only for parent term?