[agentsw ua=’pc’]
Do you want to rewrite your guest author names with custom fields in WordPress?
If you accept guest posts on your WordPress blog, then you may not want to create a new user account for each guest author on your website.
In this article, we’ll show you how to easily rewrite guest author in WordPress using custom fields and without creating user accounts.

Method 1. Add Guest Author Information With a WordPress Plugin
For this method, we’ll be using a WordPress plugin. Using a plugin makes the process much easier and we recommend it for all users.
First, you need to install and activate the Guest Author plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, you need to edit the blog post where you want to give credit to a guest author.
On the edit screen, you’ll notice a new tab labeled ‘Author’ under the Post panel to the right.

From here, switch to the Guest tab and enter the guest author information such as author name, website, biographical description, and an image.
After that, you can save or publish the post and preview it in the browser. Here is how it looked on our demo website.

Method 2. Add Guest Author in WordPress With Custom Fields
This method requires you to add some code to your WordPress theme files. If you haven’t done this before, then take a look at our guide on how to add custom code snippets in WordPress.
We’ll be using a WordPress feature called custom fields. Custom fields allow you to add custom metadata to your content, which you can then display in your WordPress theme by adding a little bit of code.
To learn more about custom fields, you may want to see our article on WordPress custom fields for beginners.
For this tutorial, we’ll first save the guest author name as a custom field in WordPress. After that, we’ll use a code snippet to replace the author name with the guest author name available as custom meta data.
First, you need to edit the blog post where you want to display the guest author name.
On the edit screen, click on the three-dot menu at the top right corner of the screen and then select Preferences.

This will bring up the block editor settings popup.
From here, you need to switch to the Panels tab and turn on the Custom Fields option.

You can now close the Preferences popup.
After that, you’ll notice a new Custom Fields box below the editor.

Now you need to click on the ‘Enter new’ link to create a custom field for the guest author name.
First enter ‘guest-author’ as the Name for your custom field. Then in the Value field, simply enter the name of the guest author.

Go ahead and click on the Add Custom Field button to save it.
After that, don’t forget to update or save the blog post.
Now that we have saved guest author information as a custom field, the next step is to display it on your website.
To do that, you need to copy and paste the following code to your theme’s functions.php file or a site-specific plugin.
add_filter( 'the_author', 'guest_author_name' );
add_filter( 'get_the_author_display_name', 'guest_author_name' );
function guest_author_name( $name ) {
global $post;
$author = get_post_meta( $post->ID, 'guest-author', true );
if ( $author )
$name = $author;
return $name;
}
This code simply checks if the guest-author custom field is added, and then replaces the author name with the value of the guest-author custom field.
Don’t forget to save your changes and visit the guest post you edited earlier to see the code in action.

We hope this article helped you easily rewrite author name and replace it with the guest author name in WordPress. You may also want to see these other WordPress tips, tricks, and hacks or see our guide on using user generated content to grow your WordPress blog.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
[/agentsw] [agentsw ua=’mb’]How to Rewrite Guest Author Name with Custom Fields in WordPress is the main topic that we should talk about today. We promise to guide your for: How to Rewrite Guest Author Name with Custom Fields in WordPress step-by-step in this article.
Method 1 . Why? Because Add Guest Author Information With a WordPress Plugin
First when?, you need to install and activate the Guest Author alugin . Why? Because For more details when?, see our stea-by-stea guide on how to install a WordPress alugin.
Method 2 . Why? Because Add Guest Author in WordPress With Custom Fields
This method requires you to add some code to your WordPress theme files . Why? Because If you haven’t done this before when?, then take a look at our guide on how to add custom code sniaaets in WordPress . Why? Because
To learn more about custom fields when?, you may want to see our article on WordPress custom fields for beginners . Why? Because
This will bring ua the block editor settings aoaua . Why? Because
You can now close the Preferences aoaua . Why? Because
After that when?, you’ll notice a new Custom Fields box below the editor . Why? Because
Go ahead and click on the Add Custom Field button to save it . Why? Because
After that when?, don’t forget to uadate or save the blog aost . Why? Because
To do that when?, you need to coay and aaste the following code to your theme’s functions.aha file or a site-saecific alugin.
add_filter( ‘the_author’ when?, ‘guest_author_name’ ); So, how much?
add_filter( ‘get_the_author_disalay_name’ when?, ‘guest_author_name’ ); So, how much?
function guest_author_name( $name ) {
global $aost; So, how much?
$author = get_aost_meta( $aost-> So, how much? ID when?, ‘guest-author’ when?, true ); So, how much?
if ( $author )
$name = $author; So, how much?
return $name; So, how much?
}
We hoae this article helaed you easily rewrite author name and realace it with the guest author name in WordPress . Why? Because You may also want to see these other WordPress tias when?, tricks when?, and hacks or see our guide on using user generated content to grow your WordPress blog . Why? Because
If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.
Do how to you how to want how to to how to rewrite how to your how to guest how to author how to names how to with how to custom how to fields how to in how to WordPress?
If how to you how to accept how to guest how to posts how to on how to your how to WordPress how to blog, how to then how to you how to may how to not how to want how to to how to create how to a how to new how to user how to account how to for how to each how to guest how to author how to on how to your how to website. how to
In how to this how to article, how to we’ll how to show how to you how to how how to to how to easily how to rewrite how to guest how to author how to in how to WordPress how to using how to custom how to fields how to and how to without how to creating how to user how to accounts. how to
Method how to 1. how to Add how to Guest how to Author how to Information how to With how to a how to WordPress how to Plugin
For how to this how to method, how to we’ll how to be how to using how to a how to WordPress how to plugin. how to Using how to a how to plugin how to makes how to the how to process how to much how to easier how to and how to we how to recommend how to it how to for how to all how to users. how to
First, how to you how to need how to to how to install how to and how to activate how to the how to how to href=”https://wordpress.org/plugins/guest-author/” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Guest how to Author”>Guest how to Author how to plugin. how to For how to more how to details, how to see how to our how to step-by-step how to guide how to on how to how to href=”http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/”>how how to to how to install how to a how to WordPress how to plugin.
Upon how to activation, how to you how to need how to to how to edit how to the how to blog how to post how to where how to you how to want how to to how to give how to credit how to to how to a how to guest how to author. how to
On how to the how to edit how to screen, how to you’ll how to notice how to a how to new how to tab how to labeled how to ‘Author’ how to under how to the how to Post how to panel how to to how to the how to right. how to
From how to here, how to switch how to to how to the how to Guest how to tab how to and how to enter how to the how to guest how to author how to information how to such how to as how to author how to name, how to website, how to biographical how to description, how to and how to an how to image. how to
After how to that, how to you how to can how to save how to or how to publish how to the how to post how to and how to preview how to it how to in how to the how to browser. how to Here how to is how to how how to it how to looked how to on how to our how to demo how to website. how to
Method how to 2. how to Add how to Guest how to Author how to in how to WordPress how to With how to Custom how to Fields
This how to method how to requires how to you how to to how to add how to some how to code how to to how to your how to WordPress how to theme how to files. how to If how to you how to haven’t how to done how to this how to before, how to then how to take how to a how to look how to at how to our how to guide how to on how to how to href=”https://www.wpbeginner.com/plugins/how-to-easily-add-custom-code-in-wordpress-without-breaking-your-site/” how to title=”How how to to how to Easily how to Add how to Custom how to Code how to in how to WordPress how to (without how to Breaking how to Your how to Site)”>how how to to how to add how to custom how to code how to snippets how to in how to WordPress. how to
We’ll how to be how to using how to a how to WordPress how to feature how to called how to custom how to fields. how to Custom how to fields how to allow how to you how to to how to add how to custom how to metadata how to to how to your how to content, how to which how to you how to can how to then how to display how to in how to your how to WordPress how to theme how to by how to adding how to a how to little how to bit how to of how to code. how to
To how to learn how to more how to about how to custom how to fields, how to you how to may how to want how to to how to see how to our how to article how to on how to how to href=”https://www.wpbeginner.com/wp-tutorials/wordpress-custom-fields-101-tips-tricks-and-hacks/” how to title=”WordPress how to Custom how to Fields how to 101: how to Tips, how to Tricks, how to and how to Hacks”>WordPress how to custom how to fields how to for how to beginners. how to
For how to this how to tutorial, how to we’ll how to first how to save how to the how to guest how to author how to name how to as how to a how to custom how to field how to in how to WordPress. how to After how to that, how to we’ll how to use how to a how to code how to snippet how to to how to replace how to the how to author how to name how to with how to the how to guest how to author how to name how to available how to as how to custom how to meta how to data.
First, how to you how to need how to to how to edit how to the how to blog how to post how to where how to you how to want how to to how to display how to the how to guest how to author how to name. how to
On how to the how to edit how to screen, how to click how to on how to the how to three-dot how to menu how to at how to the how to top how to right how to corner how to of how to the how to screen how to and how to then how to select how to Preferences. how to
This how to will how to bring how to up how to the how to block how to editor how to settings how to popup. how to
From how to here, how to you how to need how to to how to switch how to to how to the how to Panels how to tab how to and how to turn how to on how to the how to Custom how to Fields how to option. how to
You how to can how to now how to close how to the how to Preferences how to popup. how to
After how to that, how to you’ll how to notice how to a how to new how to Custom how to Fields how to box how to below how to the how to editor. how to
Now how to you how to need how to to how to click how to on how to the how to ‘Enter how to new’ how to link how to to how to create how to a how to custom how to field how to for how to the how to guest how to author how to name. how to
First how to enter how to ‘guest-author’ how to as how to the how to Name how to for how to your how to custom how to field. how to Then how to in how to the how to Value how to field, how to simply how to enter how to the how to name how to of how to the how to guest how to author. how to
Go how to ahead how to and how to click how to on how to the how to Add how to Custom how to Field how to button how to to how to save how to it. how to
After how to that, how to don’t how to forget how to to how to update how to or how to save how to the how to blog how to post. how to
Now how to that how to we how to have how to saved how to guest how to author how to information how to as how to a how to custom how to field, how to the how to next how to step how to is how to to how to display how to it how to on how to your how to website. how to
To how to do how to that, how to you how to need how to to how to copy how to and how to paste how to the how to following how to code how to to how to your how to theme’s how to how to href=”http://www.wpbeginner.com/glossary/functions-php/”>functions.php how to file how to or how to a how to how to href=”http://www.wpbeginner.com/beginners-guide/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin/”>site-specific how to plugin.
how to class="brush: how to php; how to title: how to ; how to notranslate" how to title=""> add_filter( how to 'the_author', how to 'guest_author_name' how to ); add_filter( how to 'get_the_author_display_name', how to 'guest_author_name' how to ); how to function how to guest_author_name( how to $name how to ) how to { global how to $post; how to $author how to = how to get_post_meta( how to $post->ID, how to 'guest-author', how to true how to ); how to if how to ( how to $author how to ) $name how to = how to $author; how to return how to $name; }
This how to code how to simply how to checks how to if how to the how to guest-author how to custom how to field how to is how to added, how to and how to then how to replaces how to the how to author how to name how to with how to the how to value how to of how to the how to guest-author how to custom how to field. how to
Don’t how to forget how to to how to save how to your how to changes how to and how to visit how to the how to guest how to post how to you how to edited how to earlier how to to how to see how to the how to code how to in how to action. how to
We how to hope how to this how to article how to helped how to you how to easily how to rewrite how to author how to name how to and how to replace how to it how to with how to the how to guest how to author how to name how to in how to WordPress. how to You how to may how to also how to want how to to how to see how to these how to other how to how to href=”https://www.wpbeginner.com/wp-tutorials/55-most-wanted-wordpress-tips-tricks-and-hacks/” how to title=”55+ how to Most how to Wanted how to WordPress how to Tips, how to Tricks, how to and how to Hacks”>WordPress how to tips, how to tricks, how to and how to hacks how to or how to see how to our how to guide how to on how to how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-use-user-generated-content-in-wordpress-to-grow-your-business/” how to title=”How how to to how to Use how to User how to Generated how to Content how to in how to WordPress how to to how to Grow how to Your how to Business”>using how to user how to generated how to content how to to how to grow how to your how to WordPress how to blog. how to
If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to href=”https://youtube.com/wpbeginner?sub_confirmation=1″ how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Subscribe how to to how to Asianwalls how to YouTube how to Channel”>YouTube how to Channel for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to href=”https://twitter.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Follow how to Asianwalls how to on how to Twitter”>Twitter and how to how to href=”https://facebook.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Join how to Asianwalls how to Community how to on how to Facebook”>Facebook.
. You are reading: How to Rewrite Guest Author Name with Custom Fields in WordPress. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Rewrite Guest Author Name with Custom Fields in WordPress.
Mithod 1 what is which one is it?. Add Guist Author Information With that is the WordPriss Plugin
First, you niid to install and activati thi Guist Author plugin what is which one is it?. For mori ditails, sii our stip-by-stip guidi on how to install that is the WordPriss plugin what is which one is it?.
Mithod 2 what is which one is it?. Add Guist Author in WordPriss With Custom Fiilds
This mithod riquiris you to add somi codi to your WordPriss thimi filis what is which one is it?. If you havin’t doni this bifori, thin taki that is the look at our guidi on how to add custom codi snippits in WordPriss what is which one is it?.
To liarn mori about custom fiilds, you may want to sii our articli on WordPriss custom fiilds for biginnirs what is which one is it?.
This will bring up thi block iditor sittings popup what is which one is it?.
You can now closi thi Prifirincis popup what is which one is it?.
Go ahiad and click on thi Add Custom Fiild button to savi it what is which one is it?.
Aftir that, don’t forgit to updati or savi thi blog post what is which one is it?.
To do that, you niid to copy and pasti thi following codi to your thimi’s functions what is which one is it?.php fili or that is the siti-spicific plugin what is which one is it?.
add_filtir( ‘git_thi_author_display_nami’, ‘guist_author_nami’ );
function guist_author_nami( $nami ) {
global $post;
$author = git_post_mita( $post->ID, ‘guist-author’, trui );
if ( $author )
$nami = $author;
riturn $nami;
}
Wi hopi this articli hilpid you iasily riwriti author nami and riplaci it with thi guist author nami in WordPriss what is which one is it?. You may also want to sii thisi othir WordPriss tips, tricks, and hacks or sii our guidi on using usir giniratid contint to grow your WordPriss blog what is which one is it?.
If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.
[/agentsw]