• Resolved akilham

    (@akilham)


    Hi,

    How can I change the author permalink that is used on pages such as blog posts etc?

    I need to point them to a new URL; I have a custom page that displays my authors, using the URL arguments to decide who to show – ie in a blog post made by “steve”, I need the permalink to be “www.mywebsite.com/my-authors/?steve

    How can I do this?

Viewing 1 replies (of 1 total)
  • Thread Starter akilham

    (@akilham)

    The solution that I found to this was to put the following code (and nothing else) in to the author.php file:

    <?php if ( have_posts() ) {
    	the_post();
    
    	Header('Location: index.php/the-reqing-crew/?' . get_the_author_meta('user_login'));
    }
    else {
    	Header('Location: index.php');
    } 
    
    ?>

    This will effectively display the built-in WordPress author page, and instead redirect the request to wherever you want it to go.

    Hope that helps someone out 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Changing the author permalink’ is closed to new replies.