Title: Permalink for posts under author
Last modified: August 21, 2016

---

# Permalink for posts under author

 *  Resolved [bcyork](https://wordpress.org/support/users/bcyork/)
 * (@bcyork)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/permalink-for-posts-under-author/)
 * I amy trying to put posts under .com/contributor/name/posttitle
 * I’m using this in functions.php to rewrite the author slug so its .com/contributor/
   name/.
 *     ```
       add_action('init', 'cng_author_base');
       function cng_author_base() {
           global $wp_rewrite;
           $author_slug = 'contributor';
           $wp_rewrite->author_base = $author_slug;
       }
       ```
   
 * However because i have this
 * /contributor/%author%/%postname%/
 * in the permalink settings I get the below as links to the author page.
 * .com/contributor/contributor/name/
 * Any idea how to make this happen via code or default wordpress settings?

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

 *  [Kailey (trepmal)](https://wordpress.org/support/users/trepmal/)
 * (@trepmal)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/permalink-for-posts-under-author/#post-4637797)
 * Try adding `$wp_rewrite->front = '';` as well, and flush your rewrite rules (
   just visit the permalinks page).
 * Note: this will also remove the ‘contributor/’ base from other non-post pages,
   such as category archives.
 *  Thread Starter [bcyork](https://wordpress.org/support/users/bcyork/)
 * (@bcyork)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/permalink-for-posts-under-author/#post-4637801)
 * Thank you so much Kailey! That works by putting that at the bottom like below
   and leaving the permalink settings the way i had in the original post.
 *     ```
       // Change Author URL slug to contributor
       add_action('init', 'cng_author_base');
       function cng_author_base() {
   
           global $wp_rewrite;
           $author_slug = 'contributor'; // change slug name
           $wp_rewrite->author_base = $author_slug;
       	$wp_rewrite->front = '';
       }
       ```
   

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

The topic ‘Permalink for posts under author’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [bcyork](https://wordpress.org/support/users/bcyork/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/permalink-for-posts-under-author/#post-4637801)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
