Home › Forums › General Issues › Subheadline Text Delayed when Publishing? › Reply To: Subheadline Text Delayed when Publishing?
I think you have miss-understood my advice with this one.
Looking at your code, I can see that your function ‘custom_post_title’ is not actually doing anything, yest you are still using the ‘wp_insert_post_data’ action to do your logic.
What I have tried to explain is that you SHOULDNT use the wp_insert_post_data action, but instead use the update_value filter instead.
An action or a filter is a point in time where you can run some custom functionality. As stated previously, the wp_insert_post_data action is TOO EARLY to work correctly. You need to use the acf filter instead to get the latest ACF values and then use a wp_update_post function to modify the $post object.
I hope you understand this.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.