Thread Starter
yarr2
(@yarr2)
And how this may help?
I do not want to make search looking as multiple different pages /search/…, but one page with different arguments /search?q=…
I don’t really see the difference now. The slug /search/ is the same as /search and as soon as there is a parameter for the search term behind it the wordpress own search is addressed. Technically speaking you have to redirect the request to /search?q= to the internal WordPress search. This is actually described in the article. You would have to implement the suggested code and could of course also adapt it to your needs.
Thread Starter
yarr2
(@yarr2)
Did you ever try? The provided method is not working.
Yes, just tried this a few weeks ago due to another question here on the forum. I can’t find the topic right now. You are not the first who wants to do something like this. Have a look at this topic: https://wordpress.org/support/topic/changing-search-url/page/2/
Thread Starter
yarr2
(@yarr2)
Again, it works only if you to make search pages address looking like /search/…
I am confused. Isn’t that what you said in your question?
Is there any way to make search slug looking like /search?q=
Thread Starter
yarr2
(@yarr2)
There is a difference between /search/<query> and /search?q=<query> or /search?s=<query>.
The first is working fine, the second is not.
-
This reply was modified 3 years, 2 months ago by
yarr2.
Thread Starter
yarr2
(@yarr2)
So is there any way to change search page URL to something different from /search/query ?
Is it possible to make it looking like /search?s=query or something similar?