The problem is problably here:
<form id="oselector" method="GET" action="<?php the_permalink(); ?>">
Your code is not in the WordPress Loop. According to the Function Reference (emphasis added):
the_permalink() – Displays the URL for the permalink to the post currently being processed in The Loop. This tag must be within The Loop, and is generally used to display the permalink for each post, when the posts are being displayed. Since this template tag is limited to displaying the permalink for the post that is being processed, you cannot use it to display the permalink to an arbitrary post on your weblog. Refer to get_permalink() if you want to get the permalink for a post, given its unique post id.
You might try this:
<form id="oselector" method="GET" action="<?php echo get_permalink( get_queried_object_id() ); ?>">
Related Posts:
- Creating my own Admin Forms in a WordPress CMS?
- Using transients to store captchas
- How to implement a custom password field that redirects to another page upon correct password?
- Add Div to Comment Form
- Adding custom field in all widgets, but at the top of the form, in admin area
- Custom search to display results within same page
- How Can I Move Data From Form 1 To Form 2
- Saving contact form 7 data into custom Table
- Woocommerce custom checkout form
- Custom login and registration forms
- How do I make Dynamic Student Admission Form?
- How to create multipage form and redirect to specific URL based on inpput?
- No plugin populate user information in to form
- How do I add a dropdown menu to a form?
- How to automatically pull an information from a form field onto an other page?
- How to submit form data in the same page in WordPress without reloading the page?
- Custom dropdown search form that allows users to select option B based from Option 1
- How to get name and email value from a custom form and add it to campaign monitor subscriber list?
- Custom user fields validation on registration
- Two searchforms with different categories/posts per page
- add unique code required to register
- Page template with custom html fields inside a content
- Is there a flowchart for WordPress loading sequence?
- How do register_sidebar() and get_sidebar() work together?
- Is it possible to change the attributes of a registered style or script before it fires?
- how to change “published date” format on edit.php (Posts page)?
- How to change submit button value in comment from “Post Comment” to “Send”
- Querying multiple WordPress custom fields with AND qualifier
- WordPress custom post types breaks permalink on theme reinstall
- Creating a searchable A-Z listing of hundreds of companies/services
- Show attribute description when filtering by that attribute
- Create a Custom menu item fetched by Product Categories and Sub Categories
- Multi-Site Plugin Activated (Not Network-Activated), What Happens?
- Add custom column to Users admin panel with Types user custom fields?
- How do I change the default admin color scheme in MP6
- woocommerce Add custom field set like billing fields
- Adding action to save_post, post needs to be saved twice for function to work
- Calling a php file from a javascript file in wordpress
- 1 bit audio player
- Outputting posts from post id´s in variable
- Auto redirect after session expire, but only for one user
- Auto login after wordpress installation
- Custom title, Bones theme
- Truncating varying lengths of information
- How to get pages id in array in get_pages?
- Anonymous Postings
- Access post meta in future_to_publish function
- Javascript Solution Remove Specific Tag but leave the rest in a specific DIV
- How to create a completely private wordpress with multiple membership levels
- Why do posts disappear from admin after upgrading from WP 2.7.1 to 3.0.1?
- woocommerce_checkout_fields modifying existing billing_phone label created new field
- How to change the category url jusy show /category/%category_id% in wordpress?
- custom meta box for page default template
- Child Theme with multiple css files
- How to host 2 subdomains as lookalike destinations under one master domain?
- CSS Customizations for certain page
- How can I have a common background color across multiple WordPress blocks?
- What requirements for ACF custom fields key and name properties?
- Get Custom Taxonomy Terms by Date
- Removing blank space below header [closed]
- Custom Search on Custom Page while preserving the main search function
- Archive subtitles for different types of archives
- Point homepage to custom php page
- If the image variable is specified, show image, if not no code
- Replacing words in WordPress or theme (not in content)
- Adding tags when creating new post
- How can I tag a menu item as visited for each unique user?
- Add Member’s birthdate from Backend and shows it on frontside [closed]
- Many Rewrite Parameters/Rules
- Adding other links on header than LinkedIn, Facebook, Youtube etc
- How to Render Post Types in RSS Feed?
- How to Add Additional Search Button?
- WordPress pagination with custom post type?
- How to replace blog page url with subdomain at all places, even in xml sitemap?
- Make the home page template my archive/category page template without code duplication
- Trying to update Woocommerce meta values
- WordPress 5: including larger thumbnail image sizes in srcset than I have set
- remove screenshot.png via dashboard
- Send default WooCommerce email when switching from custom order status
- Combine Categories & Custom Taxonomy
- Accept HTML in custom function
- How to access my WP site locally and publicly? [closed]
- A delete/trash all function?
- Why, when it comes to custom background and image, does ‘The first value registered’ win?
- Unable to retrieve data from multiple WordPress websites on same server
- How to customize the gallery shortcode in WordPress?
- Unable to show messages using ‘admin_notices’
- How can I add a Description column to the media library browser screen?
- Search a meta field for a value in all posts
- Upload files in wordpress
- How to know if a tag has been added within a taxonomy?
- Using str_replace on wp-admin
- Single page template
- How do I include the sidebar (with Widgets) in a custom theme?
- how to add a page
- Is it possible to show related posts on WordPress attachment pages?
- How to add filters to my site?
- How to use same username account for multiple users?
- Advanced Custom Fields in WP_Query: Href Returning Empty
- How to increase page title font size in twenty seventeen wordpress theme for static home page and single column option