Tag Info

New answers tagged


For anyone else having this issue - the working code looks like this (placed in the functions.php file): function default_post_type($post_id) { if (in_category('YouTube')) { set_post_format($post_id, 'video'); } } add_action( 'publish_post', 'default_post_type' ); Happy WordPressing


I'm also wanting the post to be assigned the post type "Video". You can't just change a post to a different Post Type. There is a difference between "Post Type" and "Post Format". From your examples I assume you would like to change the "Post Format", as per the codex http://codex.wordpress.org/Function_Reference/set_post_format, you would need to ...

Top 50 recent answers are included