Title: Need a Specific Plugin
Last modified: August 19, 2016

---

# Need a Specific Plugin

 *  Resolved [cra1g](https://wordpress.org/support/users/cra1g/)
 * (@cra1g)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/)
 * I’m wanting a plugin that will change the author’s name in the byline. For example,
   I like to have guest bloggers write every now and then, but I don’t want to have
   to make an entire account just so their name shows up in the byline. Is there
   a way that I can create a post myself, but manually type in the author’s name
   in the byline?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1354958)
 * The code below will create a plugin called ‘Substitute Author’ when copied to
   a file wp-content/plugins/substitute_author/substitute_author.php.
 * It reads a Custom Field named sa_author from a post and substitutes the value
   of the field for the Author name as shown by the_author(). Just add that Custom
   Field to your posts with the name you want substituted.
 *     ```
       <?php
       /*
       Plugin Name: Substitute Author
       Version: 0.1
       Description: Substitutes an Author name from a Custom Field
       Use the custom field sa_author with a value of the substitute Author's name.
       Author: Mac McDonald
       */
       ?>
       <?php
       /* Version check */
       global $wp_version;
       $exit_msg='Substitute Author requires WordPress 2.8 or newer.  <a href="http://codex.wordpress.org/Upgrading_WordPress">Please update!</a>';
       if (version_compare($wp_version,"2.5","<")) {
          exit ($exit_msg);
       }
   
       function sa_substitute_author_filter ($author_name) {
          global $post;
          $custom_author = get_post_meta($post->ID,'sa_author',true);
          if ($custom_author) $author_name = $custom_author;
          return $author_name;
       }
       add_filter('the_author', 'sa_substitute_author_filter');
       ?>
       ```
   
 *  Thread Starter [cra1g](https://wordpress.org/support/users/cra1g/)
 * (@cra1g)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1354985)
 * Can you better explain that to me? Do I create the substitute_author.php file
   and then paste that code into it?
 * And I got lost when you started explaining how to use it. lol
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1354993)
 * Yes, you do create substitute_author.php and paste the code into it.
 * Then, create a folder as wp-content/plugins/substitute_author and save the php
   file into it.
 * When you edit (or create) a post that you want to have a substitute author, do
   the following:
    1. Scroll down to the Custom Fields section.
    2. Click ‘Enter new’
    3. In the Name field, type: sa_author
    4. In the Value field, type the name of the author
    5. Click ‘Add Custom Field’
    6. Click ‘Update Post’ (or ‘Publish’)
 * Now, when you view the post, you should see the substitute name as the author.
 *  [iron77](https://wordpress.org/support/users/iron77/)
 * (@iron77)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1355003)
 * By the way **vtxyzzy**, your code should work fine since at least WP 2.2 and 
   even some versions back I believe ;).
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1355021)
 * Could be, but I can’t test it on those versions.
 *  Thread Starter [cra1g](https://wordpress.org/support/users/cra1g/)
 * (@cra1g)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1355035)
 * Ok, I did all the steps you mentioned and it didn’t work. It still shows my name
   in the Byline. I double checked and made sure I did everything correctly and 
   I did.
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1355038)
 * Did you activate the plugin? Sorry, I didn’t put that in the instructions.
 *  Thread Starter [cra1g](https://wordpress.org/support/users/cra1g/)
 * (@cra1g)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1355040)
 * Haha, I can’t believe I didn’t think of that. It’s working now. My only complaint
   is that when you click on the substituted author’s name in the byline, it takes
   you to the actual author’s page. Not a huge deal really.
 * Thanks!
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1355041)
 * Glad it works. Now, please use the dropdown at top right to mark this topic ‘
   Resolved’.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Need a Specific Plugin’ is closed to new replies.

 * 9 replies
 * 3 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/need-a-specific-plugin/#post-1355041)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
