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
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- How to Add Customizer Setting in Child Theme
- When adding a custom REST endpoint, where do you put the endpoint function, and where do you put the function registration call?
- WordPress objects class reference
- Customizing gallery shortcode in 3.5
- Capability to edit own posts and not others
- How do you add pages on a staging server, and then move them over to production
- Any Hook Called When Post Becomes Published?
- Automatically wrap post image in div
- Theme Twenty Fifteen: Customize Color Scheme Customizer
- How to handle security on a wordpress site? [closed]
- Which freelance sites are recommended to find WordPress developers/programmers, etc
- Is it possible to set default values for custom fields in a custom post type while my plugin is being activated?
- WordPress Template not affecting the working, keeps defaulting to the index.php template
- Custom Widget form function common elements
- How to move the wordpress site from test url to main url? [duplicate]
- Reinstall WordPress Without Losing Data
- Paginate Author’s Post List on Custom Author Page (ANOTHER THEORY)
- WP Northwind for Theme Development?
- list/consult Taxonomy only for the respective author/creator in dashbboard
- title, content, feature images
- How to check if site is created by wordpress? [duplicate]
- Enabling Additional CSS / custom-css
- How can I make site-wide content editable, for example footer content
- Custom Facebook share button with custom title,url,image in wordpress
- Sort posts by multiple meta key values
- Modify Gallery Output to render differently on a PAGE and a POST
- How to Call a static page in WordPress
- Add google org chart to wordpress page
- I’m using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box
- Create custom dashboard for Multisite admins
- The function can not create a table on MariaDB server
- Child theme .css files are not overriding their parent .css files
- Integrate wordpress into index page
- Highlight comments of all the site authors
- Set Title from Custom Template
- For a specific theme, how do I build a list of all the possible theme modification names?
- Allow guests to use WP Customizer but disable save button
- Can I add/replace the WordPress image in the Dashboard
- Post thumbnails not working in my new install of WP 3.1 with Twenty Ten theme
- Add content in between of foreach
- How to insert a writing panel between the title and the page content?
- Switch between WordPress websites easy for an end user
- Show custom message/info for authors in add/edit post page
- Create a page that dynamically loads data
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- How can I apply custom sanitization to new usernames?
- How to create custom layouts and static pages in themes for clients
- Woocommerce custom archive page custom content and shortcode
- Page flickers in customization mode
- We are facing this error in header unable to understand the issue
- When is the wp-settings-[time] cookie generated?
- Get All Results From Other Users That Share The Same Custom User Meta As Current User
- Can we set a redirection with dynamic content in url?
- How to remove (…) from the post tilte on homepage?
- Hide entry-header for a specific category
- How can I setup a development environment which auto refresh page when code have changed [closed]
- How Can I add show_post_count in get_archives_link?
- Trouble with custom login page
- I want to use a product thumbnail completely different than the product image
- How can I edit the WordPress menu link to allow fb: instead of http
- Fixed bottom menu on mobile doesn’t work on search included in Child Theme of Storefront
- Change Dashboard menu position?
- Get site ID from attachment url?
- Help needed creating a custom Hamburger menu in header
- admin aoolbar add_node() and pulling in my post slug
- duplicate featured image functionality in custom meta box
- How to create a custom menu for specific user
- Custom Form Input not saving to Database
- In wordpress customizer api adding div wrap to control
- How to create 2 preview button in a post?
- Move text from the side of image to below image [closed]
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Custom terms in custom category taxonomy
- Customize TinyMCE Buttons
- Setting Custom WordPress “Posts page” AS “Front page”
- Instead of Custom CSS Theme CSS is loading