Automatically select categories on new post based on GET value
If you start to edit a new post, already a post with the status auto-draft is created. Actually, what you see is this post. So you can hook into the transition filter new_to_auto-draft and add a category to this post: add_action( ‘new_to_auto-draft’, function( $post ) { // Bail out, if not in admin editor. if … Read more