What you want is a simple endpoint, use add_rewrite_enpoint
instead of adding a rule and query var.
function wpd_author_endpoint(){
add_rewrite_endpoint( 'pending', EP_AUTHORS );
}
add_action( 'init', 'wpd_author_endpoint' );
Related Posts:
- How to create a front end user profile with a friendly permalink
- Masking wp-content/themes/name/images to just images directory using htaccess
- Using custom/dynamic “slug” for a page
- How to make pages slug have priority over any other taxonomies like custom-post, post or category
- How do I remove a rewrite rule?
- Use subdomain for certain urls
- Rewrite URL – how to do a SEO-friendly Unicode custom URL?
- Custom slug in front of search URL
- Display posts with author in the url with custom post types
- Clash of the rewrites
- Query Vars for the Homepage?
- Disable wordpress pagination URL rewrite for specific page
- How to use Post Custom Metadata in Post Titles and Post Permalinks
- Using WordPress with Apache behind an nginx reverse proxy
- How do i change the search permanent links
- add_rewrite_rule() not playing nice with child pages
- rewrite_rule() not preserving the query string
- Custom rewrite rules are sending everything to index.php
- WordPress Network on IIS7/SQL Server – Rewrite Issues
- Custom comments
- How to Change Author Posts URL
- Change Attachment Post URLs to File URLs
- Change permalink for default archive – yearly
- Add .html extension to only one page in my WordPress site
- Migrating a page to be an article
- Multiple Permalinks for Same Post
- How to perform a query at the URL?
- Is there a way to create alias without using htacess, permalinks or delving into code?
- Remove “/page/1” from the URL
- hard flush_rewrite_rules() not regenerating .htaccess
- Remove Query String from URL on Redirect – Redirection Plugin
- Nginx rewrite rules
- Cleanup URL for a custom page in wordpress
- Use custom template on certain URLs
- Rewrite Rules Are Redirecting and Not Passing VARs
- WordPress rewrite rules don’t need ^?
- add_rewrite_rule fro html to another url not working
- Adding rewrite rules directly to .htaccess file
- How do I redirect to a non-www version and make it the default URL?
- WordPress redirects non-existing url to existing ones – how to disable
- How to rewrite url wordpress?
- Can I change default registration link (without htaccess)?
- A clean custom rewrite rule for weekly archives
- I want to add a new tag to WordPress URL permastruct
- How to remove trailing slash from root WordPress folder?
- Rewriting the URL of a custom post to a certain page
- rewrite wordpress page url for seo friendly query strings
- ReWrite rule for files of a previously standalone blog moved to network
- Fixing custom rewrite rule
- htaccess rewrite ignored
- URL renaming issue
- Best way to trigger rewrite rules
- Trouble with question mark in rewrite rule
- Redirect htaccess [closed]
- Why when I enter bad url wordpress doesn’t return error 404
- How would I get WordPress to parse /mypage/area/value as /mypage/?area=value?
- Weird characters behind every single link and images
- How to mask url of a specific page without affecting seo [closed]
- Hard to find a good rewriting rule
- Mobile version and URL Rewrite
- How do I make WordPress revise an .htaccess file a certain way?
- How are rewrite rules applied in WordPress?
- Adding Theme File for Non-WordPress Content
- How to change an existing wordpress page rewrite rule?
- Show index.php template instead of 404 page template
- URL structure for dynamic content broken since upgrade to 5.8
- Have unique URLs on the ad site
- Redirect users with “.” (dot) in their username and replace with “-” (dash) to correct profile
- WordPress dynamic page handle in theme
- Rewrite htacess rule doesn’t work
- I have a problem with WP_Rewrite
- Allowing multiple URLs for same Post
- How to create dynamic URLs on WordPress?
- ../../page-name backend links are not rewritten
- 404 Rest Route not found – when serving behind “proxy”
- Translatepress taxonomy and custom post type root FIX
- Issue with custom rewrite for products and permalinks
- Prefix only some posts with a custom prefix
- How to use a capture from a rewrite rule inside a php file (like single.php)?
- url rewriting on custom post type
- Rewriting URL with 3 custom meta fields to add onto Pages
- Rewrite URL for Search + Special Characters / Umlaute
- Rewrite rule not redirecting correctly
- rename author base from author url in wordpress not working
- Rewriting / Redirecting request outside wordpress
- How to reset WP page url with deleting the variables
- Finding and removing unnecessary redirects
- Needed to change slug to access page
- How to create short urls for sharing and downloadable content?
- URLs unchanged after migration
- WordPress Rewrite: Ignore Specific Pattern
- rewrite rule for home/index page
- WordPress index page is returning 404 and admin page requires /index.php in url
- Stop wordpress to redirecting home page if no page found
- Additional .htaccess rules based on wp page
- URL Rewriting in WordPress
- How to change search url produced by ‘s GET method?
- Hide / rewrite download link
- Lost WordPress website access after changing URL [closed]
- Rewrite rule to simulate page hierarchy results in 404