Skip to content

Instantly share code, notes, and snippets.

@hwkdev
Created May 13, 2018 14:02
Show Gist options
  • Select an option

  • Save hwkdev/cc134d82ae252eccfc0bf8edc8ba3415 to your computer and use it in GitHub Desktop.

Select an option

Save hwkdev/cc134d82ae252eccfc0bf8edc8ba3415 to your computer and use it in GitHub Desktop.

Revisions

  1. hwkdev created this gist May 13, 2018.
    7 changes: 7 additions & 0 deletions wp-change-author-base-slug.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    <?php

    add_action('init', 'hwk_author_rewrite_base');
    function hwk_author_rewrite_base(){
    global $wp_rewrite;
    $wp_rewrite->author_base = 'user';
    }