How to change the slug “author” to something else?
Eg: http://domain.pl/author/asmith to http://domain.pl/artist/asmith
That’s way outside the scope of the theme and means changing the way wordpress actually writes that directory structure. This is the kind of thing you typically would “google” to locate a how to.
You likely will need to create a function and put that in the root theme folder at end of the functions file or in the child theme folder for your custom functions file.
If you know what you’re doing, this can be done as so (apparently):
`add_action(‘init’, ‘cng_author_base’);
function cng_author_base() {
global $wp_rewrite;
$author_slug = ‘profile’; // change slug name
$wp_rewrite->author_base = $author_slug;
$wp_rewrite->flush_rules()
}
note, that $wp_rewrite->flush_rules() supposedly helps solve the 404 error when going to new rule.
ALSO: you may want to put Redirect 301 implicitly in your htaccess file for each author pointing to new location, once the new URLs actually work (not before, as you might create a loop of doom). If the old URLs automatically redirect to new location, this means WP is doing soft redirect so you won’t need to do manual 301s for each author.
IMPORTANT: once you do this you would also need to visit your permalinks settings in the wordpress panel and just hit “save” to resave.
If things don’t work right, simply remove the code from functons.php and then go back and hit ‘save’ again on your permalinks settings page. (and remove any manual 301 redirects if you do that)
Modifying how wordpress works is not part of the theme, fyi.
Hope that helped! 🙂
HAPPY HOLIDAYS ALL!
I am a helpful elf not working for TaGdiv — I’ve been updating and moving my websites and web server this month, hence a lot of “waiting and watching” the browser in one window while things update; hence surfing the web while that’s happening. Lots of little 15 minute windows where I need to watch, but nothing else I can really concentrate on; hence my little nuggets of (hopefully not too annoying) wisdom. In early Jan. you won’t see me here very often, as I’ll be working on a large project for our in-house system, but using this theme for a multi-user setup, so may have some helpful tips on that.
HAPPY HOLIDAYS ALL!
