You can accomplish this with the following rewrite rule ( you’ll want to add this in your functions.php
add_rewrite_rule(
'author/([0-9]+)/?$',
'index.php?author=$matches[1]',
'top'
);
Be aware that you might need to flush your rules for it to become active. You can do this with rewrite plugin.
Related Posts:
- Override default url for author pages?
- Display posts with author in the url with custom post types
- Author url rewrite
- Sorting archive pages with “pretty” URLs?
- Change permalink for default archive – yearly
- Adding more pages to author pages
- How to check current URL for endpoint in a template file?
- How to create a profile page for specfic / custom user role members?
- How to create rewrite endpoints it in author.php?
- A clean custom rewrite rule for weekly archives
- rewrite url for authors
- How to change the Author Slug from Username to Nickname and deal with Special Characters
- show ALL latest posts with archive.php on example.com/latest
- Rewrite only if no other matching page is found
- Custom author url and page for another role
- Change author base and slug in author link
- URL Rewrite and Archive Template Files – Post Type vs. Taxonomy
- rename author base from author url in wordpress not working
- Listing Authors – URL Formats [duplicate]
- Adding rewrite endpoint breaks static front page
- Unique URL Every Time
- Rewrite default post type
- How to add dot(“.”) in post slug
- add_rewrite_rule not loading correct page nor getting variables
- Using plus (+) sign instead of space (-) in WordPress URL
- Add language/country code to each possible URL
- Google is indexing wordpress attachment pages
- WordPress URL rewrite regex
- How to prepend route with /blog for blog listing page only
- Need help with a custom rewrite rule – http://domain/custom post slug/replies
- Why is there /index.php/ in all my links? How do I remove it?
- Taking a value from PHP_URL_PATH won’t work after WordPress 5.5 update
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- htaccess: Remove trailing slash from URL ending with .xml/ only
- Why is WP creating both “/?tag=” and “/tag/” URLS for same content?
- custom url rewrite
- Changing the search URL?
- Plugin action rewrite rule – non_wp_rules
- WordPress plugin Write User/staff ID as the same as the WordPress User ID
- Map alt domain to specific section of website w/o MU
- Remap URLs from Relative to Absolute
- Have two different URLs show the homepage
- Posting with slug “favicon” gets redirected
- Help with static front page blog at /blog
- Adding special characters to slug?
- WP is ignoring .htaccess rewritten URL
- Get url-friendly version of the_title?
- Rewrite ugly URL to clean URL
- Url rewrite on index.php?term=[term_name]
- Translate custom post type and taxonomy slug in URL?
- Rewrite: WordPress URL rewrite on Search
- How can I change the permalink of a translated home page?
- How to write Rewrite rule for same path using Rewrite API?
- Add word to permalink when custom field has a value
- simple add_rewrite_rule added, refuses to work
- 301 Redirect all posts urls from .html to / (without .html)
- Custom rewrite after the default term link URL
- How can I reduce the number of rewrite rules?
- Create a page that can be used for different URLs
- Capturing /page-name/[0-99999] in both template and number
- custom wordpress rewrite
- Get wordpress installation folder
- WordPress .htaccess ignore path and subsequent .htaccess files in subfolders
- Adding Rewrite URL for Base + Children Separately
- How to customize sub-URLs in a wordpress website (.htaccess)
- URL rewrite( I think? )
- Page not found: Custom search form with a custom search page
- Make the home page’s slug visible in the browser’s URL bar
- WordPress how to prevent URL encoding in URL of taxonomy terms
- Query vars to return the homepage
- dynamic URL rewrite
- Author Archive Page redirecting issue
- How can I add a vanity URL for admin-ajax.php Calls?
- Remove part from dynamic url and redirect
- Rewrite rule can’t get the ID from rewrited
- How to Update / Change URL when Popup Modal Loads?
- Pretty URL via Rewrite
- Dynamic Content w/ geolocation in WP?
- WordPress numeric (yearly) page names / disable yearly archives
- url redirect none www to www
- Stop wordpress from prettify URL
- Moved WordPress to Subdirectory, still hijacking requests to files outside of its directory
- How to remove Base URL Duplication?
- Rewrite URL query string for all pages
- ModRewrite not working properly
- Need help with custom rewrite rule
- WordPress doesn’t remember my custom rewrite rule
- Custom urls in WordPress involving page slugs
- Relative URL filtering
- get_permalink is getting old rewrite rule
- Rewriting URL does not automatically log me in
- Custom Rewrite for Profiles
- Pagination posts. Url format
- How do I display a friendly URL link in the frontend?
- rewriting an Url
- WordPress Post url encoding problem
- Please give me the rewrite rules for my ugly urls
- Programmatically add a custom url route “/category/index.json” to return a collection of posts in json
- WP-Include rewrite directory
- WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?