Home › Forums › General Issues › Subheadline Text Delayed when Publishing? › Reply To: Subheadline Text Delayed when Publishing?
Hi @Nitruc
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.
Thanks
E
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.