Skip Navigation

[Closed] Create a filter with taxonomy

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 1 year, 10 months ago.

Assisted by: Minesh.

Author
Posts
#2568307
Schermata 2023-03-08 alle 13.02.51.png

Greetings,
I need to create a filter via dropdown, filtering a series of taxonomy created by me. I created the filter via view and so far so good (I see the correct taxonomy, but when I click on the (submit) button.

I enclose a photo of the filter, I would like to understand how I can use "url_param" to set a dynamic link to pass to the button.

#2568395

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share what dynamic link you mean and where exactly you want to attach that dynamic link?

do you mean that the taxonomy term URL param value you want to add it to the search button? If you can tell me the exact flow then I will be able to guide you in the right direction.

#2568413

I'll give you an example right away, I have this page with a filter with countries (which works well) hidden link my goal is that when if you enter one of these places I have to add another filter inside that connects to the taxonomy (which in my case is the nations).

I tried adding a filter within a page and when I use the filter the link goes something like this hidden link -destination=UAE+Arabs&wpv-wpcf-destination=UAE+Arabs&wpv_filter_submit=Change+center and it doesn't work.

To work, you should go back to the generic page and exit a lin like this hidden link duration-inps=15+days&wpv_aux_current_post_id=38166&wpv_view_count=115698

#2568421

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

It seems to me both links are same.

You are using ajax filter so we can not modify the URL params as its required for custom search and pagination to work it properly.

I still do not get what is not working. Maybe you can share video recording or share few screenshots or share exact steps that I should follow to understand what issue you have and what is your requirement.

#2568433

I would need something like this, however, created through Toolset so as to update easily as the taxomania changes.

The problem I'm having now is that it tries to filter within a page while it should first go back to the generic page and then apply the filter

<div class="d-none" id="filter-mobile">

  <div class="dropright">
    <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
      Cambia centro
    </button>
    <div class="dropdown-menu">
      <form>
        <select>
          <option value="" selected="selected">Dove vuoi andare?</option>
          <option
            value="<em><u>hidden link</u></em>">
            Emirati Arabi</option>
          <option
            value="<em><u>hidden link</u></em>">
            Francia</option>
          <option
            value="<em><u>hidden link</u></em>">
            Germania</option>
          <option
            value="<em><u>hidden link</u></em>">
            Irlanda</option>
          <option
            value="<em><u>hidden link</u></em>">
            Malta</option>
          <option
            value="<em><u>hidden link</u></em>">
            Regno Unito</option>
          <option
            value="<em><u>hidden link</u></em>">
            Spagna</option>
          <option
            value="<em><u>hidden link</u></em>">
            USA</option>
        </select>
        <input type="submit" value="Submit" class="myButton">
      </form>
    </div>
  </div>
</div><!--filter mobile-->


document.querySelector("form")
.addEventListener("submit", function (e) {
e.preventDefault(); // prevent default action
var select = this.querySelector("select");
if (select.value !== "0") {
location.href = select.value;
}
})
#2570115

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

There is no such solution available. I'm not sure why you want to move to the generic page. Maybe you should add a button that should move user to generic page and allow them to filter the results again or you can add the reset filter button.

Do you mean that you want to allow the user to filter with "Destinazione" dropdown and also you want to hook in another taxonomy filter dynamically? If yes, what taxonomy you want to add when you filter with "Destinazione" dropdown?

Maybe you can share few screenshot of your structure or video that should help me to understand what exactly you are looking for and once I review that I will be able to guide you in the right direction.

The topic ‘[Closed] Create a filter with taxonomy’ is closed to new replies.