-
Hey,
if you ever wanted to easily link the author page to the user profile you can do it with a function (add code inside the functions.php of your template). with plugins you may have problems with permalinks.
before: website.com/author/john.doe
after: website.com/profile/john.doeCode:
add_action(‘init’, ‘change_author_base’);
function change_author_base() {
global $wp_rewrite;
$author_slug = ‘profile’; // change the name for ‘author’ here
$wp_rewrite->author_base = $author_slug; }It’s not working for me. But my theme is using <?php the_author_posts_link(); ?> to display the author name.
I’ve also tried echo get_the_author_meta(‘display_name’);
but obviously that doesn’t work because it doesn’t add an anchor. (Just plain text display name.)I wonder what I need to change it to in my template to get the rewrite to work.
I’ve been searching everywhere for a way to achieve this. This method is not working :/
Hello,
I found a quick way to achieve this (atleast for now) and is adding this#BEGIN (AUTHOR DATABASE REDIRECT TO PROFILE PAGES)
Redirect 301 /author http://mightyinks.com/profile
# ENDinside .htacess file.
This method works fine but the only thing is that im not a fan of using the UserName permalinks and doing it this way make you do it like that.
Hope this helps 🙂
You must be logged in to reply to this topic.