Save a Custom Field as the Post Title
-
I’m using the Custom Field Template plugin and need to save the title of my posts based on one of the custom fields (a drop down list of post titles from another post type).
I think I need to use the save_post hook, and I’ve seen a few related posts here in the forums and online, but I can’t seem to figure this one out. Here is what I think I need to do (but I’m having trouble doing):
Take the post into my function
Read the value from the custom field (it’s a drop down so I’ll be getting the ID back) <- not sure how to do this
Use that value to query for the title of the post that will be used for this post title <- I know how to do this in my sleep
Set the returned post title as the title for the post being saved <- Not sure how to do thisCan anybody get me pointed in the right direction?
Thanks!
- The topic ‘Save a Custom Field as the Post Title’ is closed to new replies.