Created
March 26, 2012 20:09
-
-
Save fritids/2209312 to your computer and use it in GitHub Desktop.
How to change author base without front
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//http://wordpress.stackexchange.com/questions/31418/how-to-change-author-base-without-front | |
function change_author_permalinks() { | |
global $wp_rewrite; | |
$wp_rewrite->author_base = 'connect/member'; | |
$wp_rewrite->author_structure = "/" . $wp_rewrite->author_base . '/%author%'; | |
add_rewrite_rule('connect/member/([^/]+)/?$', 'index.php?author_name=$matches[1]', 'top'); | |
} | |
add_action('init','change_author_permalinks'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment