mysite.com/author/name, to mysite.com/profile/name. However, you can change this to anything that you would like. Instructions:
- Add this code to your theme’s functions.php file or in site-specific plugin.
- Change
profilein line 4 to any name you would like.
add_action('init', 'cng_author_base');
function cng_author_base() {
global $wp_rewrite;
$author_slug = 'profile'; // change slug name
$wp_rewrite->author_base = $author_slug;
}
Note: If changes is not reflecting after adding the code, you can check after updating permalink setting from back-end.
No comments:
Post a Comment