A
A
alex-saenko2018-02-12 13:12:03
WordPress
alex-saenko, 2018-02-12 13:12:03

How to teach the site to add arguments to the URL when fetching in an AJAX filter?

Yes, a future catalog project. It has an AJAX filter https://catalog.mediagroup.space/explore/
When selecting search arguments, nothing is added to the URL, so the user cannot share a search link with someone.
The question is, how can this be organized?
CMS wordpress. The catalog software is the WP Job Manager plugin.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nurlan, 2018-02-12
@daager

For each form change, you run a function that runs through the form, collects information about the field values ​​and places it in an array or string, and then in a hash.
Your form elements are not native, so the code will not work 100%, but the direction is given to you:

window.location.hash=jQuery("#search-form > div.search-filters.type-place > form").serialize()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question