How-To: Changing "Author" Base – UserPro Forums https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/feed/ Sun, 05 May 2024 16:39:07 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/#post-36339 <![CDATA[How-To: Changing "Author" Base]]> https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/#post-36339 Tue, 06 May 2014 17:26:41 +0000 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.doe

Code:

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; }

]]>
https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/#post-37282 <![CDATA[Reply To: How-To: Changing "Author" Base]]> https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/#post-37282 Wed, 14 May 2014 22:20:03 +0000 Matthew Jenkins 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.

]]>
https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/#post-37639 <![CDATA[Reply To: How-To: Changing "Author" Base]]> https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/#post-37639 Sat, 17 May 2014 00:41:07 +0000 Dr.Cat I’ve been searching everywhere for a way to achieve this. This method is not working :/

]]>
https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/#post-37644 <![CDATA[Reply To: How-To: Changing "Author" Base]]> https://forum.userproplugin.com/forums/topic/how-to-changing-author-base/#post-37644 Sat, 17 May 2014 01:28:23 +0000 Dr.Cat 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
# END

inside .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 🙂

]]>