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
- How to add a custom field in the advanced menu properties?
- Sortable Custom Columns in User Panel (users.php)?
- Importing data for advanced custom fields plugin?
- Gutenberg add a custom metabox to default blocks
- How to rename a custom field?
- Adding Custom Field to Taxonomy Input :Panel
- How to activate “custom fields” section in WP3
- How to filter or search the posts using postmeta tables custom meta fields with wordpress REST API
- Add meta data to the menu
- Custom bulk action for media gallery items
- Copy SEO Meta Desc “Custom Field” to Excerpt field?
- Custom fields won’t display on my blog page
- How to customize default wordpress editor?
- Order Custom post type loop by custom field (datepicker)
- Localized Date Format for Custom Field
- How to edit multiple post with Custom fields
- Undefined index error when saving content on metabox
- Saving custom image meta fields
- How to update custom user meta field in wp?
- Query post order by post and desc not working
- If category then echo a custom fields
- How can I show custom fields in the loop only to specific user roles?
- Add conditional custom option to ‘Display name publicly as’ dropdown
- Custom fields not getting saved in the databse when added to the add new user profile page
- Show 1 post and after a specific date show the next one
- How to order posts by one custom field and filter them by another one?
- Can we create a WordPress read-only virtual field derived from three other fields?
- How to create a gallery custom field for WordPress post?
- How to display image inside container of custom made widget
- Custom Metabox additional item
- Duplicate (or more) custom fields on many posts. Is there an easy way to clean them up?
- How to add new field to the account address?
- Split the_title
- Sort WP_Query with numeric custom field
- Display Multiple Values of Same Key
- How to Wrote Simple Calculations by Using Custom Fields in Loop?
- How can I use custom properties to set different background on different pages?
- change order of images attached to post
- Loop through incrementing custom fields
- Enable a short code in the custom meta field
- tax query between operator like
- The conditional logic only works to show or hide?
- Perform function on publish AND save (not just save)
- Single page WordPress website – custom fields or meta boxes or something else?
- Collect Data from NEXT item while in loop
- Custom product fields in wp e-Commerce plugin [closed]
- How to query for posts with either one or another custom field
- How show post only from after custom date
- How to add extra field in admin comment section
- wordpress multi user question
- How to sort post listing on a page using custom field value?
- Odd functions.php issue in WordPress
- Filter or order based on custom field
- How to set up page fields with gutenberg instead of ACF
- ACF multi taxonomy on filterable gallery
- How to improve my non-unique metadata MySQL entries?
- WordPress Rest API custom field not updating till i manually update the post
- search based on custom field
- Display taxonomy loop using custom field data
- Adding more fields to the registration form
- Add custom field information to source meta data
- use mysql to replace one custom field value with another custom field value
- Change blog post title on main blog page
- Spit out list of distinct instances of custom field?
- Filter and display a specific custom field value [closed]
- Is it possible in WordPress
- Edit different parts of a page seperately
- Get multiple posts with some custom fields efficient
- Custom fields: dropdown values depending on other custom field value
- Custom fields / meta box output
- Creating an If/Else statement using WPAlchemy MetaBox radio boxs
- Media Custom Fields – get a value with PHP
- How to add google map to custom field
- jaredatch metaboxes on video post formats
- Truncating characters in Advanced Custom Fields works some places but not others?
- How to add an ACF only for parent term?