Viewing 4 replies - 1 through 4 (of 4 total)
  • By using .htaccess, this could be easily done.

    But you have to search it from your side.

    Thread Starter m77nf

    (@m77nf)

    Sorry
    However, I searched, I didn’t get anything. Can you help?
    I don’t know how to code it!

    Moderator bcworkz

    (@bcworkz)

    Here is a basic .htaccess rewrite template. You need to alter it for your configuration. One wrong character can bring down your entire site, so be ready to restore the original working condition. Sometimes your error and access logs will give a clue to what went wrong. I’m not responsible if you don’t confirm the correct syntax for yourself. This is just a template to point you in the right direction.

    <ifmodule mod_rewrite.c>
    	RewriteEngine on
    	RewriteBase /
    	RewriteCond %{REQUEST_URI} ^/user/	[NC]
    	RewriteRule ^/user/(.*) /author/$1	[L]
    </ifmodule>

    Thread Starter m77nf

    (@m77nf)

    I’ve found another code myself.
    Anyway, thank you very much for your help.

    <?php
    
    add_filter(
        'init',
        create_function(
            '$a',
            'global $wp_rewrite;
            $wp_rewrite->author_base = "the name";
            $wp_rewrite->flush_rules();'
        )
    );
    // Put Your ideal slug instead of "the name"
    
    ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing author page address’ is closed to new replies.