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
- Minimising number of queries on a page when using Advanced Custom Fields
- Query Posts depends on custom field inside repeater field using acf
- ACF Relationship + WP Template Parts
- Minimising Database Queries when using Advanced Custom Fields
- ACF – Get lowest & highest value from field
- If two first numbers exist in wp_meta_query value
- 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?
- Include custom field in Ajax search WordPress
- 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
- Meta_query on same meta key, with diffrenct values
- Troubles with acf/save_post and WP_Query
- 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
- WP_Query with meta_query dosen’t return results
- 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
- Multi-layered WP_Query
- Oxygen Repeater Advanced Query
- 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
- WP_Query for distinct meta values
- Group Product Types
- WPQuery Date and ACF
- 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?
- WP Query by variable custom field
- 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
- How to query wordpress with array of meta_values?
- 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
- How can I modify standard search query to include also ACF custom fields values?
- 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