Skip Navigation

[Resolved] Custom Search with clean URL

This thread is resolved. Here is a description of the problem and solution.

Problem:

The user wanted to have a clean url when performing their search.

Solution:

This can be done by enabling the setting "Do not adjust URLs after loading search results" in the custom search settings area of your view.

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Ben 5 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1191187

Ben

Is it possible to set up a custom search within a View that doesn't affect the URL and keeps it fully clean?

#1191265

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

Thank you for contacting our support forum.

Unfortunately not because the views plugin require that the parameters for the search passed into the URL.

Thanks,
Shane

#1191497

Ben

Thanks for the reply Shane.

In "Custom Search Settings" what does "Do not adjust URLs after loading search results" do if the URL parameters are needed then?

#1192039

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

You are indeed correct. This setting will give the correct result of a clean url.

Now it should be noted that you will lose out on the browser history function, which means if a user wants click the back button in their browser to see what they searched for previously it wont work.

Sorry for my misinformation in the earlier post.

Thanks,
Shane

#1192088

Ben

No need to be sorry Shane.

Apart from the browser history function, are there any other differences when using this setting?

#1192199

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

No there isn't any other difference. As this is in the Browser history management.

Also on the relation to the Search, this is a similar case with the pagination. If the user goes to page 2, then will need to click on the page 1 button to go to the previous page. Pressing the back button in their browser will result in the search resetting.

Thanks,
Shane

#1199461

Ben

Thank you for all your help with this Shane! Very much appreciated.