Rename your <select>
to something other than page_id
.
The problem is that page_id
is already taken (and handled) by WordPress (as query var).
This should do, for example:
<?php
if (isset($_GET['editevent']) && true == $_GET['editevent'])
echo 'Post ID: '.$_GET['my_page_id'];
?>
<form method="GET" action="#">
<select name="my_page_id" id="my_page_id" onchange="this.form.submit()">
<?php
$args = array(
'posts_per_page' => -1,
'post_type' => 'event',
'season' => '2013-2014',
);
$posts = get_posts($args);
foreach ($posts as $post) :
setup_postdata($post);
?>
<option value="<?php the_ID(); ?>"><?php the_title(); ?></option>
<?php
endforeach;
?>
</select>
<input type="hidden" name="editevent" value="true" />
</form>
Related Posts:
- How to redirect user to a page after form submission
- How to pass email values from one php page to another
- Remove #wpcf7-f2450-o1 with Contact form 7 redirect [closed]
- WP_List_table with form of method=GET redirects to wrong url after submit
- Display Freebie Page Content only if Referrer is from Form Page
- simple wordpress form redirection
- Make a treatment before the action of the form
- Default URL for category dropdown select option
- Why is WordPress redirecting to homepage after GET form submit?
- Custom Form Redirects to Post after Submit
- noheader on the user/frontend side
- How to redirect to a page after submitting form data?
- Create a custom redirect link that tracks the first visited page and after submitting form goes to first page using formidable forms plugin? [closed]
- Why is WordPress redirecting from http to https on a local environment?
- Non-WordPress page in subdirectory under WordPress page
- Clarification on auth_redirect()
- Exclude a path from WordPress using .htaccess redirects (Apache)
- Restrict Access to wp-login.php
- Stop unwanted WP redirection to new url
- Problem to redirect custom page using htaccess
- WordPress within a subdirectory of another WordPress environment doesn’t work
- wp-login.php — redirect logged in users to custom URL
- Website redirecting to old domain name
- How to do 301 redirect to Sub page using htaccess file?
- Redirect feed to 404 page
- Does WordPress automatically redirect url without parent slug?
- Redirect guest if he tries to access a specific page
- Localhost wordpress site redirects to public site
- Redirect homepage ( www.sitename.com ) to the latest post
- Redirect all post into some category to url without category
- How to redirect URL with subfolder to the same URL but without subfolder?
- What is the right way to redirect all traffic to HTTPS?
- If User is NOT Logged in and Page ID is not 6 – Redirect to Login
- Where’s the redirect happening? [closed]
- Front end user creation form! How do you keep the user on the same page in event of error?
- URL redirect problem
- How to redirect if a background request is still being executed
- WP site in infinite redirect loop
- Regex with HttAccess
- WordPress keeps redirecting subpages without http to https homepage after switch
- Redirect non-existent subpages to second part of url
- https – too many redirects
- How to remove the [L] Flag for WordPress index .php mod_rewrite
- ReDirect subfolder link to another sub-folder and force SSL
- How do I remove the RSS Feed Redirect?
- Why does WordPress redirect when I separate wp-core and wp-content?
- Redirect user to original url after login?
- User redirect to specific URL after logging in
- What is the most efficient (ie. less server intensive) way for 301 redirects?
- BuddyPress – Redirects on Login and Logout
- Logout without confirmation and SAME window on mobile
- adding GET variables to a header() location in a page template
- WordPress CSS/Theme gone after SSL got activated
- Redirect 301 of old urls to wordpress urls
- How can I redirect a request to the site root using htaccess, if there’s not a specific cookie set?
- redirect “about author” code to about page
- get_bloginfo prints IP instead of url
- redirect doesn’t work while using example code
- Redirect After Login Error
- Redirect after get_delete_post_link
- Is it possible to detect if a POST action is for a “Save Post” before the save_post action?
- Disable and Hide WP-JSON
- URL redirection
- Redirect when not logged and parametr in link
- Browsers Forcing Multisite to https
- Is it possible to change redirect template through a shortcode?
- How do redirect user back to previous page when on certain pages?
- Hide a Post everywhere except on redirect
- Keep the old referrer after failed login
- How to 301 redirect WP posts id “/c/94940894” to permalink with post name?
- WP 301 redirect does not work
- URL redirect regular expressions redirecting all after first viriable
- 301 Redirect Link to Media
- WordPress Redirect post to outside website based on useragent
- How to create mass 301 redirects with PHP in Nginx server without using a WP plugin
- HOW do you Redirect buddypress login to EDIT tab not PROFILE tab on profile page? [closed]
- WordPress redirects to backend when i’am not logged in
- Redirect to custom admin menu after plugin activation
- home page redirect loop after update to 4.8
- 301 Redirects when change URL in WordPress database
- How can I redirect to another page with screen already at the bottom of the page?
- How is this URL being redirected?
- What’s the best way to redirect to a new wordpress website?
- 301 Redirect only for posts
- Submit form to another template (ugly url)
- How to move a https website back to dev and access the admin?
- Redirect after user changes password
- Getting error when trying to redirect WP site to mobile site
- URL is redirecting (301) when query string is passed through URL
- Hide page for user logged and redirect for profile? [duplicate]
- Redirect URL while building site
- Redirect ignore last URL segment
- Creating custom link that redirects to a another link
- Other pages fine but wp-admin showing ERR_TOO_MANY_REDIRECTS Error
- How to redirect users without permission to view content to a custom page?
- Redirect loop upon installation of my plugin
- redirect the root of a domain, while leaving the www version unredirected
- How to Create Custom Route to a page in WordPress
- How to create a redirect to another domain like safe redirect manager from php
- Post Migration Site Migration Redirects All Known Solutions Attempted