Most sensible here is probably just a custom query
global $wpdb;
$sql_find_meta =
"SELECT post_id
FROM database_name_here.wp_postmeta
WHERE meta_key = 'my_special_value'
AND meta_value > '';"; // > '' == not null, whitespace or blank
$posts_with_meta_key = $wpdb->get_col( $sql_find_meta );
foreach ( $posts_with_meta_key as etc.....
You can repeat this for wp_termmeta
and term_id
Related Posts:
- get_post_custom stripping styling issue
- How to get Advanced Custom Field Value According using POST ID? [closed]
- Guest Author – How to display posts on /author/ archive page
- How do I correctly set up a WP-Query to only show upcoming event-posts?
- Saving Post Data in Another Database
- WP_Query custom field pass the post id
- If custom field is empty, use one from a previous post
- Auto populate custom fields by post date
- ACF Relationship – Get Parent’s Post Object
- How to make a local “scroll to ID” on post?
- Create a list of posts with topic headdings
- Add field to user meta table in database when link is clicked
- Hide custom metabox value from custom fields
- Get post meta retrieving wrong value
- Querying posts by latitude and longitude to build a Google Maps with several markers
- Edit multiple custom post types while saving a new or edited post
- ACF to select posts not displaying on blog page
- if in category but only with post meta
- Check if current user has a post and that post has any term/s from a specific custom taxonomy outside the loop
- Parent category / child category posts
- Getting property of non-object when looping through post objects from ACF
- wp_set_object_terms NOT working on CPT, but wp_set_post_terms does
- Update post meta within save_post action
- Output Post with ACF Fields into other Post
- Only allow posts with a specific term to only be viewed by other authors with the same term in their post
- Count the number of a post types associated with another post type
- Add hero image to home page (blog format) via the dashboard
- Add two custom fields as a default to the “new post” page.
- After ajax image is outside the “ tag
- How to display post list in a table layout (multiple queries in single loop)
- Edit custom fields in posts list
- Add multiple meta keys to a post at once
- Get current post’s nav menu name (term name)
- Accessing Post ID Within Loop
- saving/reading custom field value does not work – no value gets POSTed
- Why my meta boxes won’t show in front post page?
- Adding external field to my post form (admin side) and to post show (frontend side)
- How To Use Custom Fields With .mp3 Links
- how can display a post on home screen without images
- Display content between two dates?
- Will multiple category descriptions effect my search engine optimization?
- Automate post update for all posts?
- What snippet do I need to type to show my ACF field show up on my theme?
- How to save template data into wp_post table (post_content column)
- Override WordPress core post-template.php block template
- ACF flexible content block not showing on live site (works locally)
- Only the most recent post is showing on my category page (working on localhost, not live site)
- Post picker custom field on page
- get_field values for each post on home page using wp_add_inline_style
- Post meta not working
- ACF date picker to trigger category change
- Custom Fields – How to get the list of a specific active widget each time it rendered
- search form for custom fields
- How to work with posts and sub posts?
- Run a function when a custom post is update?
- Query on a repeater date (acf)
- Adding an option to post editor to show a site disclaimer or message
- Saving canvas generated image when saving post causes 404 error
- Template with ACF and Pagebuilder
- Need to display a Jan 1st post as the site’s front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
- Is there a way to save different data when USER interacts with the same POST?
- How do you update post date (year only) in a separate custom field?
- Change post value in WordPress
- How to get value of a selected option from select tag and use it in WP_query to filter posts?
- Assign a day of the week to post, e.g: Assign Monday to post and have it only appear when the day is Monday
- Loop through taxonomies and loop through their terms (Newbie question)
- How do I display posts ordered by a date custom field?
- WP_Query sort by meta_value_num or date
- How can we print out total number of posts filtered by post type and category?
- Creating Ordered Query using Meta_key
- WordPress Request Post All Post ID in a Loop? [closed]
- Extracting a TLD from the content and assign to custom field
- How can I set and update the the_date according to a custom field of the post
- How to retrieve a post by inputing the url in a custom field and displaying it on an options page
- Custom fields in normal posts
- WP Query between posts custom fields [duplicate]
- get_the_ID() fails the first time, returns a value the second time it’s called
- Run function after post is updated
- Using Post ID and Page ID in same function
- Apply comment to different post (not the current post) [duplicate]
- Loop through posts by each term and exclude duplicate posts assigned to several terms
- Order posts by separate menu order for different sub-categories
- Displaying Results From Custom Taxonomy Query
- How to only allow post to be deleted if custom field doesn’t exist
- How to get all the terms of a post
- How to custom sort-out editing-panel fields?
- Delete old post with new post
- How can I create a menu items from meta box based on users input
- get_post_meta property of non object
- Home page: using custom fields for posts and pages
- How would I attach media/images to a post based on a ID stored in a each post’s custom field
- How do I insert a custom field in a user submitted post?
- Attaching global meta to custom fields
- First Custom Post Custom Fields Empty After New Custom Post
- How to Do Custom Fields to Output a Definition List
- Display a custom field rating system in the front end
- How do I show the post title if an advanced custom field hasn’t been used?
- How enter custom post meta or custom field on box post list archive page?
- Custom post order returning posts from other categories
- Read more opens attachment