Untested, but if I understand you correctly, try something like this:
$results = new WP_Query( array (
'post_id' => '<id-here>',
'post_type' => 'acf-field', //not necessary, but insurance
'post_excerpt' => '<custom-field-name>', //not necessary, but insurance
'meta_query' => array (
'key' => '<custom-field-name>',
)
)
);
Related Posts:
- Check before publishing, if already exist post with current custom field value
- Add validation and error handling when saving custom fields?
- How to store the value of a custom field dropdown select for post referencing?
- Get updated meta data after save_post hook
- Check if the value of a field has changed on save_post
- Get updated meta value after post update or published (custom post type) using hook
- custom-meta-box checkboxes from loop won’t save
- Saving Custom Field Data before Publish
- Allow only one post with specific meta value
- What is the proper way to add a required field to a post type? [duplicate]
- Custom metabox not displaying multiselect data in edit mode
- How to validate select field in post meta?
- frontend submit post jQuery clone row won’t save
- Can wp_insert_post_data filter be used to save custom field data?
- Exclude URL’s from sanitize_html_classes
- Why isn’t update_post_meta saving?
- update a custom field with the value of another existing custom field
- Why WordPress takes time to make request to save post?
- Saving metadata of related post on save_post
- Change event firing in wordpress
- I want my post to republish again after adding a custom field
- added a meta box to post however when saving menu while debug on throws a warning
- Multiple triggers when publishing, saving or updating a post in WordPress
- Set post status to draft after validating post meta values in save_post hook
- Custom fields empty after refreshing page
- Add custom fields to wp native gallery settings
- How can I add extra attribute in the ‘Page Attribute’ section in wp-admin for pages?
- Custom field/meta populated by dropdown of existing posts?
- Custom search: by post data and post metadata?
- Pass all custom fields through the same filter on post load?
- What is the advantage of the wp_options design pattern?
- update_user_meta: How many is too many?
- Search ONLY by meta key / meta values
- Correct Approach for Validating Custom Field Input
- Query meta field using between
- Delete post based on a custom field?
- How to make custom comment fields required and message field not required
- Dynamic User State & City selection
- Update meta values with AJAX
- How can I migrate all of my custom field thumbnails to the built-in post featured image?
- Custom fields to save multiple values
- get_user_meta Short Profile Section
- Plugin similar to Taxonomy Drill-Down for custom fields?
- Extend ‘The Events Calendar’ search to include custom fields [closed]
- Saving custom profile fields
- Default WordPress taxonomy (Tag) – How to add a custom field to form and save it to the database
- Add field to ‘Add User’ admin page
- Escaping Quotes
- How to sort category by custom field value
- wp_editor removes paragraph from custom meta box
- Any way to include custom fields in WP_Query results?
- Using a checklist to search against metadata
- Move value from one meta key to another
- Where did the Add New Custom Field go?
- Will loading too many ACF Fields cause slow down?
- Admin meta Image Path
- How to associate 2 custom fields together (date & price for instance)?
- Using PHP to read WordPress Posts
- 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
- How to create a dropdown select of all items in an ACF field group
- Is it possible to create a post from an NextGen Gallery image?
- Getting Custom Fields from WordPress JSON API [closed]
- Delete custom fields when deleting posts
- Pull custom fields from custom posts within a loop
- Ordering posts by custom field named “date” in backend
- How to pass page as an argument like post in WordPress?
- How to display custom fields from a plugin
- Adding “meta” info to WP site PHP function?
- WordPress Media Uploader custom Javascript not working
- Custom fields issue [closed]
- Select custom posts by meta_value and sort by a different meta value
- List custom queried terms in the edit-tags.php?taxonomy page
- Display meta box dropdown (from custom post type) in the page post type
- Front end register with custom fields
- Display custom field from the front page on another page
- No result update a custom field using wp_schedule_event
- Display custom widget value in header.php
- Gravity Forms Update post meta from template [closed]
- Automatic linking terms
- wpdb function insert doesn’t work
- Get Custom Field Name ( Label or Key ) Not Value
- Adding Custom Metadata to my Archive/Posts page
- Custom User Dashboard
- Custom meta POST request fired twice when updating a post in Gutenberg
- add meta box considers the selected option as post parent
- Extend WP_User_Query or WP_User to return all custom fields?
- Quicktag button to automatically add a custom field to a post
- WordPress taxonomy child image
- Create custom fields/meta data gender+country – radiobuttons and dropdown on register screen for these fields
- Override edit_custom_walker.php to conditionally show input depending on menu position
- Download stuff after filling fields?
- Custom search with meta fields
- Use custom field value as href
- Custom registration form and custom field
- Custom field for image, not showing image!
- Truncating characters in Advanced Custom Fields works some places but not others?