Title: Change Author hack/plugin?
Last modified: August 18, 2016

---

# Change Author hack/plugin?

 *  [pixellated](https://wordpress.org/support/users/pixellated/)
 * (@pixellated)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/change-author-hackplugin/)
 * Anyone know of (or care to whip up) a plugin or hack that will let you edit a
   post’s author when there are multiple authors?
    Thanks, -Bob

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

 *  [robgreeley](https://wordpress.org/support/users/robgreeley/)
 * (@robgreeley)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/change-author-hackplugin/#post-84472)
 * Same issue here – I accidentally wrote a bunch of posts as “Admin” when I should
   have been logged in as myself – now I don’t know how to change them back – any
   ideas out there?
    Thanks Rob
 *  Thread Starter [pixellated](https://wordpress.org/support/users/pixellated/)
 * (@pixellated)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/change-author-hackplugin/#post-84474)
 * Well, seeing as it’s been two weeks and nobody’s even responded with so much 
   as a “feh” I decided to muddle my way through and add it in myself. This is a
   total hack, and isn’t pretty by WP standards, but it works.
    In **/wp-admin/post.
   php**, scroll down to _case ‘edit’_ and add the following after **$post_title
   = addslashes($_POST[‘post_title’]);**: `$post_author = $_POST['post_author'];`
   Scroll a little farther down to the _UPDATE $tableposts_ query and add the following
   after **post_status = ‘$post_status’,**: `post_author = '$post_author',` Save
   and close. Open **/wp-admin/edit-form-advanced.php** and scroll down to the _postpassworddiv_
   fieldset, and add this in immediately following it: ` <fieldset id="postauthordiv"
   > <legend><?php _e('Post Author') ?></legend> <div> <select name="post_author"
   > <?php $authq = "select * from wp_users order by ID"; $authr = mysql_query($
   authq) or die(mysql_error()); while ($auth = mysql_fetch_array($authr)) { echo'
   <option value="' . $auth['ID'] . '">' . $auth['user_nickname'] . '</option>';}?
   > </select> </div> </fieldset>  Save and close. Done.
 *  Anonymous
 * [21 years, 9 months ago](https://wordpress.org/support/topic/change-author-hackplugin/#post-84475)
 * Interesting — I just changed the author name in the database when i needed to,
   but that looks useful.
 *  Anonymous
 * [21 years, 9 months ago](https://wordpress.org/support/topic/change-author-hackplugin/#post-84476)
 * Thanks! Very useful. Much easier than working in the database!
    Kaimi Wenger
 *  Anonymous
 * [21 years, 9 months ago](https://wordpress.org/support/topic/change-author-hackplugin/#post-84479)
 * A quick follow-up question — right now, any time I edit a thread, it wants to
   reassign the author as site admin. Can I change that?
 *  Thread Starter [pixellated](https://wordpress.org/support/users/pixellated/)
 * (@pixellated)
 * [21 years, 9 months ago](https://wordpress.org/support/topic/change-author-hackplugin/#post-84499)
 * Hmm… I suppose you could modify the dropdown menu to default to a different user
   each time. You’d have to hard-code it in, though:
    ` <select name="post_author"
   > <!-- hard-coded default --> <option value="X" selected="selected">Default User
   Name</option> <!-- end default --> <?php $authq = "select * from wp_users order
   by ID"; $authr = mysql_query($authq) or die(mysql_error()); while ($auth = mysql_fetch_array(
   $authr)) { echo '<option value="' . $auth['ID'] . '">' . $auth['user_nickname'].'
   </option>'; } ?> </select>  See if that helps.
 *  [paizai](https://wordpress.org/support/users/paizai/)
 * (@paizai)
 * [21 years, 8 months ago](https://wordpress.org/support/topic/change-author-hackplugin/#post-84508)
 * ive got the X-value:
    `<option value="<?php the_Author_ID() ?>" selected="selected"
   ><?php the_author() ?></option>`

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

The topic ‘Change Author hack/plugin?’ is closed to new replies.

 * 7 replies
 * 4 participants
 * Last reply from: [paizai](https://wordpress.org/support/users/paizai/)
 * Last activity: [21 years, 8 months ago](https://wordpress.org/support/topic/change-author-hackplugin/#post-84508)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
