Rewriting Author URL Base

Hi

Normally, when i want to change the author base from /author/ to something else, I can normally achieve this with some simple PHP code or by using a plugin.

However while using the latest version of the pro theme, numerous plugins that i’ve tried, and multiple variations of the code using $wp_rewrite doesn’t seem to have any effect. This was true after I used flush_rewrite_rules(); and flushing the permalink cache.

Any thoughts on why this not working? Are there any alternatives to this?

The original code I tried using was:

function rewrite_author_base_slug() {
global $wp_rewrite;
$wp_rewrite->author_base = ‘team’;
}

add_action( ‘init’, ‘rewrite_author_base_slug’ );

Hi just a small update.

I’ve disabled all plugins and used the main theme instead of the child theme I was using, and still produced the same results.

Also the site has no caching of any kinda enabled.

Hi Geoffrey,

Thanks for reaching out.
Although we don’t offer any investigation or support to the custom coding, still I checked your code and it worked after resetting the permalinks to plain and back to %postname%.

Hope it helps.
Thanks

Hi

Unfortunately it’s still not having any effect.

Hi Geoffrey,

I have checked that code before and it was working as described in my last post. But it will be very difficult to recognize why the same code is not working at your end. I would suggest you consult a developer on this or you can avail of our newly launched service called One, where we answer the questions beyond normal theme support.
Please remember that we don’t offer any support or investigation on custom coding or related issues.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.