The trick is to call the hook “wp_insert_post“. But the post-type is not what you expect – post, page oder custom post type. It’s “revision”.
Now you can fire a WP_Query right after the post is saved in the database.
Related Posts:
- WP User Query with Custom Fields and Search Results
- Display List Of Posts Containing a Relationship Field Value [ACF]
- Using OR conditions in meta_query for query_posts argument
- ACF Relationship Field Search Filtering [closed]
- Getting all user metadata from user
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- Searching user meta using WP_User_Query
- WordPress meta_query and order by custom field
- SQL query equivalent to WP User Query
- Revolution Slider Orderby Two Custom Fields
- meta_query with array as value
- query posts in functions.php and update a field
- Query wp_usermeta alongside wp_users
- Query Posts depends on custom field inside repeater field using acf
- Minimising Database Queries when using Advanced Custom Fields
- ACF – Get lowest & highest value from field
- WP_Query meta_query >= date
- Minimize database queries to user tables?
- How to display specific posts with WP_Query?
- How To Fix WP Query Returns Results But Shouldn’t?
- ACF Date Based wp_query
- Multiple taxonomy And acf filter group by
- Custom query based on meta key – Reduce three states to two in results?
- What is the random string I am seeing when I use get_query_var?
- Any number in meta key (wp query)
- How do I run through a WordPress loop called from a filter function?
- How can I display a custom field from all posts and order them individually from their parent post
- Is there a way to work with a specific the_field from an already queried post? [closed]
- How to Union two different conditions in one WP_Query
- Excluding pages in WP_query using ACF
- How to do a wp_query with two acf-fields, sorting on one of them
- Using Advanced Custom Field for file upload, how do I load the file url
- Multisite wp_query & switch_to_blog issue
- Stuck in the query loop
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- wordpress ajax relationship query
- Is there a better way to pull in custom content without querying posts?
- Include post content of linked posts in search
- ACF accessing a field from the query, but not in post
- filter wp_query result with custom field values
- Reduce number of SQL queries inside WP_Query loop to fetch author data
- How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post? [closed]
- Merge 2 custom post type posts and taxonomy terms and sort ascending
- Add ACF field in a query
- JSON – Create rest api endpoint for Advanced Custom Fields
- How to properly use AND / OR in custom search
- Expecting statement error from php loop using ACF plugin
- Custom query filter by ACF date custom field
- query post by author gender
- Get a list of ACF Repeater-Fields as array
- WordPress dynamic AJAX query
- WP Query orderby ACF boolean values and ACF field value
- Optimising WP_Query with ACF Fields
- Order WP_Query by meta_key priority when ‘OR’ relation used for multiple meta values
- ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
- Nearby locations using Advanced custom fields, maps?
- WP_Query – display posts by custom field and order by another
- Excluding posts from search results page with meta query not working
- Counting instances of words in the results of a post query
- Populate select list with meta values from all posts of a Custom Post Type
- Form checkbox value going to dynamic URL
- ACF: How can I publish values of ACF fields in a loop while using wp_query?
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- create custom shortcode wp and put php code in
- Query for getting posts with their custom fields data in WordPress
- Why does my output of get_the_ID() change after a wp_query?
- How to get taxonomy image attached to a Post Type WordPress
- How to rearrange posts based on input field values added by WordPress “Advanced Custom Fields”
- WP Query with meta queries
- Unusual high query of user meta data
- Custom query showing all acf field values instead of the one searched
- WP_Query, ACF field and array
- Pre get posts sort by meta key returns no results if meta key does not exist
- using custom meta user data to run queries in WordPress
- ACF query-pass field value
- Slow wp_posts and wp_postmeta query using Advance Custom Fields
- Limit default Search query to post_title
- Query string order by custom field
- ACF: using two loops, the_field returns field content from another loop
- Best way to query posts and order by relevancy to query
- WP_User_Query not searching numbers?
- Get posts meta_query by repater field
- Wrap group of wp query posts to parent div by date/year
- Object of class WP_Query could not be converted to int inside shortcode
- Wrote a WP Cron Plugin and it triggers a fatal error upon activation
- Issue in If else condition [closed]
- Can’t get the_content to show
- The sorting of posts by a meta_query with two keys fails while separated as single queries it works
- Get the type of an advanced custom field (ACF) in a WP_Query loop [closed]
- Query posts filter not working
- Creating array to compare custom field values
- How ‘secure’ are loops?
- Display all custom meta field values from the database using ACF Repeater
- Output ACF field dynamicaly within a taxonomy loop [closed]
- Get all user with both meta_value
- Get posts using multiple values from ACF checkbox as meta query wordpress
- I want to place a post before all others from an ACF boleen field
- How do I subquery with custom meta fields?
- Best performance for use Custom Field in WP
- Use value from meta key array for use in WP_Query