• hassanjunaid

    (@hassanjunaid)


    I have created the cars widget on my website and on taxonomy page, I have created different filters like sorting by price using forms with GET method. They are working fine on desktop version on some browsers like chrome but the query strings are not attached to the URL on others like Edge and on mobile devices. I have purged the caches but the issue is still there. Thanks in advance for guidance.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • threadi

    (@threadi)

    As far as I can see, none of the forms are sent via GET. I think the sorting also works, but it is strange that the selected value is not selected again after reloading the page. If you have written this yourself with PHP, you would have to take a closer look here to see if you are reading the value from the post request correctly.

    Thread Starter hassanjunaid

    (@hassanjunaid)

    I have changed the method from GET to POST and everything is working fine. My concern is, why GET method is showing this unusual behavior? I am trying to figure out this problem. One possibility that I think of is that maybe WordPress has removed this GET method in custom forms for security purposes.

    threadi

    (@threadi)

    No, WordPress doesn’t do that. You can check this yourself by debugging what arrives on the server after sending it via GET. Example:

    var_dump($_GET);
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.