If you want to keep this information in the $_GET
, you will have to modify the form’s action
parameter URL. You can do this by hooking into site_url
:
add_filter( 'site_url', 'wpse18418_site_url', 10, 4 );
function wpse18418_site_url( $url, $path, $scheme, $blog_id )
{
if ( 'login_post' == $scheme ) {
$url .= '&role=doctor'; // Or do this dynamically
}
return $url;
}
But instead of always looking in the $_GET
, it might be a solution to save the role
field in a hidden field and check $_REQUEST
instead – it will contain both $_GET
and $_POST
.
Related Posts:
- WordPress redirects non-existing url to existing ones – how to disable
- Redirect HTTP to HTTPS for all sub domains (blog posts)
- add_rewrite_rule: $matches var not replaced by captured value
- Custom permalinks with NextGEN Gallery
- How to change default page slug?
- Will references to ugly links automatically redirect to their pretty url permalink?
- How do I add a add_rewrite_rule without it redirecting?
- WP Login forms action URLs displayed as pretty URLs in browser (ex with Restore Password)
- Sub domain redirection to taxonomy
- wp_sanitize_redirect strips out @ signs (even from parameters) — why?
- Redirect user after login/registration globally
- Redirecting all old links from previous EE site to new WP site in one go?
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- Using a custom field value to redirect away from a 404 page
- Rewrite WordPress Custom URL
- WordPress removes spaces in URL on pagination
- Custom rewrite rule
- Home page with Polylang redirects to other page [closed]
- expecting 404 but redirecting to post with url subdirectory in post title
- Alias ‘wp-content’ directory to something shorter (framework?)
- Is there a ‘rake routes’ for wordpress?
- Remove Query String from URL on Redirect – Redirection Plugin
- How to auto login after registration? [duplicate]
- How to redirect to home page after registration?
- add_rewrite_rule fro html to another url not working
- Double domain name in category URL-s
- NextGEN Gallery Lightbox – Social Share URL Redirect
- My WP_options db rewrite_rules Does Not Work
- Rewrite Preview URL to include index.php
- How to disable URL rewriting for specific URLs?
- How do I display only the parent page in the url
- How to remove wordpress directory slash
- Wildcard forward all posts and pages with few exceptions
- How to remove trailing slash from root WordPress folder?
- How to redirect large amount of URLs?
- Redirecting /px/?q=x to /px/x/
- Rewrites: .htaccess or wp_rewrite for bulk 301 changes?
- URL redirect on updating the post date
- How to redirect a link to a new link?
- Rewrite vs Redirect from ?p={ID}
- 301 Redirect all posts urls from .html to / (without .html)
- How do I Redirect a WordPress Page?
- Is WordPress API visible from PHP file called in htaccess
- Re-directing URLs with dates to URLs without dates
- Redirect htaccess [closed]
- How to redirect Webp files?
- 301 Rewriting htaccess
- 404 redirect based on url
- Redirect User to login page
- How are rewrite rules applied in WordPress?
- WordPress 3.1.2 Network Enabled non-www to www
- Redirect to new domain that serves new and different content
- WordPress rewrite front page url
- Redirect users with “.” (dot) in their username and replace with “-” (dash) to correct profile
- remove SLASH on single_post but KEEP on categories and parent pages
- Redirect empty search to another page
- Remove part from dynamic url and redirect
- Fresh install redirects to www, breaking page loads
- How to redirect new registrars to a custom registration page instead of WP default registration page?
- Broken page redirect
- Make URL like /fr/something display same as /something
- URL rewrite before template_redirect called
- Remove trailing slash
- Use Parent Pages for URL Structure without Landing Page
- taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
- Error 404 wordpress redirecting URL
- How to create short urls for sharing and downloadable content?
- Redirect A URL Pattern In WordPress Using .htaccess
- URLs ending with number higher than 2147483647 redirects to to domain.com/2147483647
- Redirect if string found in URL
- Migration from old CMS to WordPress 301 redirection rules?
- Changes done to .htaccess are not getting reverted back
- How to change search url produced by ‘s GET method?
- How to make custom WordPress page deliver search results
- Using .htaccess to redirect /da/ to / in URL
- How to make a category page the blog home page?
- PHP – redirect https to http and www to non-www
- Taxonomy rewrite question
- How do I create a dynamic page?
- Nginx rewrite rule conflict with WordPress permalinks rule
- Firing a function AFTER redirect
- Using custom mod_rewrite without breaking wordpress permalinks
- subdirectory install breaking existing links
- WordPress category page redirects in .htaccess not working
- Rewrite query string to path
- Why does my URL rewriting only work using two different methods?
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Help with a custom rewrite
- Not able to rewrite the pagination URL for the posts
- forward/redirect taxonomy archive of term to a page with same name
- Manually Create PHP Page For A Redirect
- Redirect Problems with Archive Page and GET variables
- Unable to access the query variables in the template
- Why is there a 404 on page 2+ for my search page?
- Redirect users in first login to a dynamic link
- .htaccess RewriteBase equivalent for WordPress – Passing a URL as a variable without getting a 404
- Need Help With A Rewrite Issue
- Function to rewrite URl in WordPress
- Can’t get pretty permalinks to work without index.php
- Change url site.it/wordpress