It turned out, that the following solved my issue:
function search_rewrite_rules()
{
global $wp_rewrite;
$wp_rewrite->search_base="Search Product";
}
add_action('init', 'search_rewrite_rules');
This hook moves the search_base to the given page, which enables everything I wanted to achieve.
Credit goes to the guy in this query:
Custom slug in front of search URL
Related Posts:
- Creating search form for custom database table
- Search through custom post type and custom fields takes 5 minutes
- Customise search form in the Widget
- Comment filtering (search)
- Combine multiple words in custom meta search query
- Custom search page and search by title, content and tag
- Search a post using the date it was posted
- Setting custom search engine indexing for a “dynamic WordPress page” with htaccess
- Custom URL going to 404
- Search result page redirect ex.com/?s=searchterms to ex.com/searchterms
- Hi, I wanted to make custom search with multiple fields
- Steps for custom data retrieval
- Custom search to display results within same page
- Search widget will search everything in the site, how to limit to only search gallery name
- How to hook up search results page to a back-end page?
- Admin search post meta
- Add a searchbox to the body of a page
- Custom Loop Query For Search Page
- Search URL parameters query [duplicate]
- Applying WP-cli Search & Replace to Static SQL Dump File
- How to create custom search page
- Custom Same Page Search
- How to Add Additional Search Button?
- How to Clear Empty Search values?
- WP Search Form Query: Add Author’s posts into search query
- WordPress search on a custom table
- Adding overlay search to wordpress using add action/filter
- Allow WP users to sort search result on a videos site
- WP_User_Query Search Multiple Keywords from a Multi-Select Field?
- Custom dropdown search form that allows users to select option B based from Option 1
- Custom search results
- WordPress custom search – pagination
- Creating a search with tag variable also added for more detailed results
- What shortcode should I use for
- Two searchforms with different categories/posts per page
- Search a meta field for a value in all posts
- Custom search by several options send on form not works
- Search results load individual post in slide out div
- Custom Search Results Page
- WordPress Search on Multiple wp sites
- Create a custom search for Estate Agency WordPress site
- How can I make a search term redirect to a page
- Sort Search Results in Order of/by Character @ count (9) of post(s) title. (Ocean-WP theme)
- Show total sales for each products on search results page Woocommerce
- Custom Search on media files PDF images pages posts
- Where are Additional CSS files stored
- How to use more than 256MB of memory in the admin?
- Localization: I want the backend: english and frontend in defined language
- How to get current_cat in navbar, in single post
- wordpress custom walker for thumbnails with custom menu
- Selecting An image from the Media LIbrary on the frontend
- WordPress audio player has two different styles
- Allow Users to Set Password During Registration
- WordPress 3.1 removing ‘category’ from the slug
- Why does WordPress 3.0.4 keep deleting the contents of the .htaccess file?
- Intercept invalid email during lost_password
- Only append custom classes to nav menu items
- Hide upload image fields for the different media upload popups
- WP-Admin gives 403 Forbidden after login on CentOS 7
- Custom Taxonomy Archive not displaying entries
- Creating Search Engine Friendly URL’s with Word Press
- Add Div to Comment Form
- Extend Screen Options
- How to add “Read More…” link in twentytwenty
- How to remove the search fields in Twentytwelve
- adding homework to a school’s website
- Understrap child theme JS not working in custom-javascript.js file
- Resizing of a header/div in a website through css in wordpress [closed]
- Login/Logout Session Sharing – Multiple WordPress Installations
- Where in code to replace content before display of page?
- Page content dissapears after loading the page [closed]
- Toggle custom fields?
- Simplify the admin end
- Creating a shortcode by pulling in a custom field from a plugin
- Hide Customizer’s Widget Choices From The List
- Custom Post Types database persistance. Why not?
- Edit specific text on a static page
- Customise the Category Widget
- Showing Meta Box via Jquery Checkbox
- custom user meta query
- Create new network instance, import old single installs AND keep the urls?
- Problems with setting up a subdomain to serve images and scripts
- Why does a custom php code inside a custom template not get executed?
- Disable “-mp4-image” screenshots from appearing in Media?
- wordpress custom posts page not showing
- Wrap WordPress Login Form in custom Div
- Automatically reject a comment if website field contains anything
- Replace publish date in blog module with custom field
- Need help with drop down list on the profile
- Creating WordPress staging environment software
- How to add H1 Tag on Homepage?
- Use another theme template in my theme
- Display popular posts by how many hits it got within 30 days of publishing
- How to make my wordpress site responds for 2 domains
- User registration add user ID?
- Can’t Auto-Update, but permissions are good?
- How to answer, and we aren’t using WordPress to manage your site? [closed]
- Is there a way to have information on one page automatically feed into another? [closed]
- User Query Multiple Orderby Clause
- Create a page for each database table entries