I have a custom post type called “listing”, and a custom taxonomy called “listing_state”.
I’m using formidable to create posts. What I am trying to do is have two things happen when a user selects a state from the taxonomy drop down.
First, to set the taxonomy, which is what happens now. But then at the same time, also have this selected state get copied to a custom field called “state”.
The end result should be a listing that is classified by state, but that also holds that state name in a custom field as well.
Any ideas? Thanks in advance for any help.
Try hooking into ‘save_post’ action:
This works by waiting till the post is saved and grabbing the taxonomy term right out of the
$_POST
vairable.