Skip Navigation

[Resolved] Shorten filter urls.

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 6 replies, has 2 voices.

Last updated by Himanshu Agarwal 5 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1199187

Hi,

I have four filter in a view, after any change in filter result is updated and a url is created. I want to show this url must be short.

Currently if a custom field name is "Quantity" and i add a filter for this field in a view then after change in filter is show like this in url:
wpv-wpcf-quantity=20

I want to show it like this in url:-
quantity=20

Please help me to achieve this.

#1199247

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-02-12 at 14.10.31.png

Edit your View and make sure that you can see the Query Filter section (using the Screen Options tab at the very top of the page, if needed).

For every filter control you add in the Search and Pagination editor, a corresponding Query Filter is added. The URL parameter specified in the filter control matches that in the Query Filter (see screenshot).

You can edit these to use an alternative string, they just need to match.

#1199592

Okay, Thank you Nigel, I made the changes as you suggested and its working fine.

But there is something showing that is not in my filter fields

wpv_aux_current_post_id=65&wpv_view_count=91-TCPID65

Please let me know what is this and where this is coming from. Could we remove these if yes then how?

#1199669

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-02-13 at 07.45.25.png

Those parameters are used when using custom search filters or pagination with ajax.

You can prevent them being shown by going to Toolset > Settings > Front-end Content and unchecking the options shown in the screenshot.

#1199880

After unchecking the options shown in the screenshot there is nothing showing in url, it means custom fields in url are also removed.

I want to remove only wpv_aux_current_post_id=65&wpv_view_count=91-TCPID65 this, but keep the custom fields in url.

Please help me to get this.

#1199881

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

It's either globally display the parameters or don't display them, they cannot be disabled individually, and those additional parameters cannot be customised, sorry.

#1199888

Okay, Thank you Nigel.