Home › Forums › Add-ons › Options Page › Copy options page to new post after selecting category › Reply To: Copy options page to new post after selecting category
There is not hook that will automatically copy they message to the category when it is selected. That would require creating a script that would detect the change and make an AJAX request. In order to get the change to the category the options page would need to be saved.
You can alter the term that the message is saved to by getting the field that selects the category and using that term ID in place of were I put the “8” in my code.
update_field('general_air_pressure', $value, 'term_'.$term_id);
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.