WordPress.org

Ready to get started?Download WordPress

Forums

Change Author on Custom Post (8 posts)

  1. xjoex93
    Member
    Posted 3 weeks ago #

    The option to change the author is not available on the custom post type. Not sure how I can insert it. Does anyone know how I can add it to the custom post type?

  2. It would need to be added in the code when the CPT is registered. What are you using.. a theme option.. a plugin?

    Alternatively, you can change the author name in the database. I'm sure a Google search would yield some directions; but let us know if you don't find anything.

  3. KostasNi
    Member
    Posted 3 weeks ago #

    In addition to what Josh said, the option might be there but hidden.

    If you open edit page the post you need to change the author on, look on the upper right corner and click on the Screen Options. A number of checkboxes will appear. If "Author" is there but is not checked, just check it and the Author Selector will appear on the main pane.

  4. xjoex93
    Member
    Posted 3 weeks ago #

    @Josh yea I'm using a template which is why it's a little more confusing. I'd need to add something to the themes code correct? What would I add? And where?

    @KostasNi, it's not hidden I checked that already. Thanks though!

  5. Steven Jones
    Member
    Posted 3 weeks ago #

    You can add support for features on post types after they have been registered.

    function my_cpt_support_author() {
    	add_post_type_support( 'my_cpt', 'author' );
    }
    add_action('init', 'my_cpt_support_author');

    http://codex.wordpress.org/Function_Reference/add_post_type_support

  6. +1 @Steven Jones!!

  7. xjoex93
    Member
    Posted 3 weeks ago #

    Thanks, but i'm not sure where to post the code since i'm using a template...any advice?

  8. Steven Jones
    Member
    Posted 3 weeks ago #

    You can put it in functions.php in your theme.

Reply

You must log in to post.

About this Topic