[wp-hackers] setting category on publish

Mike Little wordpress at zed1.com
Fri Jul 20 15:13:25 UTC 2012


On 20 July 2012 15:59, Kirk Wight <kwight at kwight.ca> wrote:

> Is there a way to assign a category to a custom post type upon its
> scheduled publishing?
>
>
Take a look at the action transition_post_status (
http://codex.wordpress.org/Post_Status_Transitions) which is triggered as a
post's status changes.
You can test whether the transition is to the 'publish' status, and of the
correct post type, and assign/change the category accordingly.

Mike
-- 
Mike Little
http://zed1.com/


More information about the wp-hackers mailing list