Archived topic
Changing Search slug and its parameter
7 replies · Started by Gulshan on December 4, 2019
Hello dear,
Can you please suggest me snippet for below changes
To https://example.com/search?q=
Expected HTML output
<form method="get" class="search-form navigation-search nav-search-active" action="https://example.com/search/">
<input type="search" class="search-field" value="" name="q" title="Search">
</form>
Thanks in advanced!
Hi there,
Is this what you are looking for?
https://docs.generatepress.com/article/generate_navigation_search_output/
Yes, exactly. Thank you very much. 😊
No problem :)
Hello Leo,
Above solution works perfectly for Navigational Search which relates to GP Theme.
I wonder if you could help me with default widget search box? I felt that was needed for my 404 page.
Thanks
Hi there,
This article might help: https://www.wpbeginner.com/wp-tutorials/how-to-change-the-default-search-url-slug-in-wordpress/
Let me know :)
Sorry, no. It return example.com/search/QUERY
I need example.com/search/?q=QUERY
Query string "q" after /search/ is important for me.
Hmm, I'm afraid I can't find a solution for this, unfortunately.
You may find an answer if you ask this over on https://wordpress.stackexchange.com/.