my author slug base appears to be: www.website.com/post-author/name
, where as it should be like www.website.com/author/name
.
please tell me the code to remove "post-" from the slug base.
Have you tried change the permalink to Post name as the following image: http://prntscr.com/7xh0vu
By default WordPress uses your username as author URL slug, and /author/ as the base. A user with the username JohnDoe will have an author URL like this:
http://example.com/author/johndoe
Hope this helps !
i am just asking to remove the "post-" from the url, it should display like http://www.abc.com/author/name. right now its showing as /post-author/name
only author slug, it doesn’t have to do anything with post permalinks. i only want to remove "POST-" from the author URL.
You can add the following code to the functions.php file:
add_action('init', 'cng_author_base');
function cng_author_base() {
global $wp_rewrite;
$author_slug = 'author'; // change slug name
$wp_rewrite->author_base = $author_slug;
}
Or use the Edit author Slug plugin: https://wordpress.org/plugins/edit-author-slug/
Hope this helps !
Please login or Register to submit your answer