How Do I Change the Author on a WordPress Blog Post?

When you’re writing a blog post, you might want to change the author. There are a few different ways to do this.

The easiest way is to use the “author” field in the WordPress post editor. To do this, go to the post’s front-matter and locate the “author” field. You’ll see something like this:

To change the author, just type in your new name in this field and press enter. WordPress will automatically update the post’s metadata, including its title and byline.

If you’d rather not use the post editor, you can also change the author using the wp_set_authors() function. This function takes two arguments: the post ID and the new author’s slug. To change the author on a post using wp_set_authors(), simply call the function like this:

wp_set_authors(post_id, slug);

As with changing the author in the post editor, wp_set_authors() will automatically update all of the post’s metadata.

Ultimately, whichever method you use to change the author on a blog post is up to you – but be sure to get your name and slug correct!.

Related Posts