Home › Forums › Backend Issues (wp-admin) › Set WordPress excerpt and post thumbnail based on custom field › Reply To: Set WordPress excerpt and post thumbnail based on custom field
I was curious because you said that acf/save_post
is not working. ACF4 uses acf_save_post
, but if you’re using ACF5 then there isn’t any reason it shouldn’t be working.
The code used when using acf/save_post
should be different. For one thing acf passes your action function the post ID so you don’t need to go through the trouble of figuring out what it is.
When using acf/save_post or save_post hooks, there is a change of creating an infinite loop and you need to remove the action and add it again. This is probably the cause of your internal server error. https://codex.wordpress.org/Plugin_API/Action_Reference/save_post#Avoiding_infinite_loops
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.