Your form doesn’t have an action
, so it submits to whatever the current URL is. You can point it to home_url()
so it will submit there regardless of what page you search from.
<form method="get" action="<?php echo esc_url( home_url() ); ?>">
Related Posts:
- How to remove search bar from a wordpress theme? [closed]
- wp_enqueue_scripts not called on search page?
- How can I customize wp_footer, where is the code that controls what this function does?
- Implement advanced search
- Why is the post type on the search result page random?
- Non-Blog Website without Search: are comments.php and search.php in theme still required?
- WordPress Filtering Custom Post Type by Metadata and Search Heirachy
- Post and page content not displaying in search results
- $_POSTing to and modifying the WP search results page
- Custom theme won’t use search.php
- Search Form Not Working
- altering search terms
- Custom search template is showing 404 when adding query string
- Woocommerce AJAX filters option loading spiner – problem on mobile device
- Why not works the search.php file?
- Is it possible to show sort page excerpt in search.php
- New theme HTML5 Support for Search in WordPress 4.4
- WordPress Custom Search By Alphabet and order by asc and sesc
- Incorrect search results in search.php – issue triggered by using `define(‘BodyID’, ‘search’); the_post();` in search.php
- The normal loop with different styles doesn’t work in search.php
- Search Results not displaying for multiple word search
- custom theme’s search not working
- Is wp_is_mobile() effective?
- Display Menu Name using wp_nav_menu
- What questions do you ask when asked to give an estimate on theme development?
- How to remove dashicons.min.css from frontend?
- What’s the difference between home.php and index.php?
- get_template_part vs action hooks in themes
- Google Maps not displaying in wordpress using Google Maps Javascript API
- When to use esc_url, esc_html, esc_attr, and friends?
- Hide certain pages / posts on wp-admin, show custom filter
- What is the purpose of an extra file for translation?
- use add_action(‘wp_head’) in a widget for generating dynamic CSS styles
- Problem with registering menus – What to do when other solutions aren’t working?
- Front End Post Submit Form
- add_theme_support(‘my-custom-feature’)
- Displaying wp menus by name without using theme locations
- Adding dashicon fonts to the admin of pre 3.8 installs
- How to add dynamic inline style?
- Change display of featured image for pages in twenty seventeen theme
- Do I really need the div class entry?
- How to manipulate “add media” pop-up
- WordPress Gutenberg Theme: Structure, Hierarchy and Custom Templates
- How to Take Ownership of a Theme
- Best way to start becoming a wordpress developer
- Why wp_head() function not loading style.css?
- How to make content editable from admin page?
- Redirect Old .php URLs to New WordPress Page
- Widget items disappearing
- Add submenus to Theme options menu
- create-guten-block in wordpress theme?
- WordPress navbar with logo in middle [closed]
- How to add new args data in $wp_customize->add_setting?
- Can’t login unless twentyfifteen theme is active
- the_excerpt(); tag not working
- Storing the contents from txt file into The_Contents”
- How do you replace content generated by custom fields with custom blocks in Block Editor?
- How to show custom meta_key in each li of menu
- Can I add multiple arrays within add_theme_support( ‘colors’ )?
- Issue with loading mobile specific custom single page layout in mobile
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Where to place template files?
- [&hellip appearing instead of […]
- Getting author URL outside the loop
- Replace single_template filter with what for default posts?
- How to have content scroll over background
- Need help with adding templates (archives and sitemap) to WordPress child theme
- save_post action doesn’t passing post id to my function as argument
- Is there Photo Categories?
- Why still output /wp-content/themes/twentynineteen?
- WordPress does not load page template or anything else, just empty page with header and footer
- add shortcode support in customizer
- How to make my themes compatible with different WordPress versions?
- add jquery file if a certain page is included
- Exclude subcategory from wp_query
- Some doubts about WordPress handle the horizontal main menu visualization
- How To Display Value from Theme Options Field in Front End Template?
- Archives and Categories in Custom Menu
- How do I restructure the comment HTML layout?
- How to set a custom URL for the iframe in the customize page
- How to render block editor in wp-admin custom pages programmatically
- Fetch data from database with dropdown selected option
- How do I keep my iframes responsive and scaled to fit their container?
- How to Show Next, Previous, and Page Numbers with wp_link_pages
- Let user publish posts on community page
- How to perform str_replace on the results of wp_list_pages
- How would I get this to work – send to post from thick box
- Safe way to echo wp_trim_words
- Show category and description
- How can I demonstrate themes well?
- How to update my own theme?
- trying to figure out how to use more that one image upload in the same section in theme customizer
- WordPress custom jquery not found
- How to using custom DB tables
- Programatically add a page in WordPress
- Replacing static code in a template file with a sidebar and widgets?
- How to remove proudly created by WordPress in theme?
- How to load custom php file in WordPress themes
- Roll my own theme or customize an existing one [closed]
- Is there any halfway decent documentation on the wp.media JS class?