• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

Customize WordPress author slug

Learn in this tutorial how to change the default WordPress author slug to a custom slug using code.

The default slug that WordPress uses for authors is author, so the final URL of an item looks like this: yourwebsite.com/author/author/nombre-autor/.

But maybe you want to change it. Is this your case?

Well, you only need a few lines of code:

Snippet to customize the author slug in WordPress

Add the following code at the end of functions.php or in your functionality plugin:

To see this and another 847 code snippets of this website, login or subscribe here.

It’s that simple.

In this case, the new slug would be professional (I’m sure from reading other recent tutorials you know why). 😉

But you can change the slug to whatever suits you best.

Conclusions

Do you want to change the default author url in WordPress? Now you know how to do it easily with code.

Any questions? Let me know in the comments.

And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉

PHP WordPress

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

Lost your password?