WordPress.org

Support

Support » How-To and Troubleshooting » Custom Post Type : How to Change Author

Custom Post Type : How to Change Author

Viewing 3 replies - 1 through 3 (of 3 total)
  • Big Bagel
    Member

    @big-bagel

    You can designate an author in custom post types just like normal posts. If you’re not seeing the meta box with the option, open “Screen Options” (top right) and make sure the Author box is set to display.

    http://www.myvideosnapshots.com/examples/issues/screenoptions.jpg

    Thats whats odd. I just double checked. See my screencap.
    Nothing available for authors. Same thing when viewing all posts in the custom post section.
    And when editing a single post in custom post.
    Do I need to do something in the code when setting up the custom post, to enable it? I have not disabled it.
    Its available on regular posts.

    Big Bagel
    Member

    @big-bagel

    Sorry, I didn’t realize register_post_type() didn’t have all those things enabled by default. You can use add_post_type_support() or set the supports argument when you call register_post_type().

    For example, if you want to use the first function, something like this should work:

    <?php add_post_type_support( 'my_post_type', 'author' ) ?>

    Edit (that’s what I get for not properly reading the codex):
    You should do as the codex page says and hook that up to ‘init’.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Type : How to Change Author’ is closed to new replies.