Skip Navigation

[Closed] Multiple Taxonomy Filter

This support ticket is created 4 years, 8 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 6 replies, has 2 voices.

Last updated by Christian Cox 4 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1594257

Hi, i'd like to query 2 or more taxonomies. I just wanna use toolset to show the results but i would like to mantain the wordpress url structure.

I use elementor to insert views (but i don't think it can be a problem).

Let's take an example with 2 taxonomies and 1 custom post type

1st Taxonomy
- City

2nd Taxonomy
- Type

Custom Post Type
- Location

I would have a permastructure like this

Home
hidden link

Location Archive
hidden link

City Archive
City: Rome
hidden link

Type Archive
Type: Hotel
hidden link

Mixed taxonomies
City: Rome
Type: Hotel

hidden link

#1594261

P.s.
I also 'd need, in the Mixed taxonomies page, to retrive each single taxonomy term and taxonomy field to be shown on the page.

#1594685

Hello, Toolset Views can create lists and filter based on URL parameters or shortcode attributes, but does not support or respond to custom URL permalink structures like this. The WordPress Archives created in Views, and the single posts created with Types, are displayed at permalink strucutres based on WordPress URL standards:
- homepage: yoursite.com/
- custom post type archive: yoursite.com/post-type-slug/
- single post in custom post type: yoursite.com/post-type-slug/post-name-slug/
- taxonomy archive: yoursite.com/taxonomy-slug/term-slug/

WordPress does not offer something like a mixed taxonomy archive as far as I know. Views could use URL parameters to help achieve this on a custom Page, but not using directories at the URL structures you have described. To achieve something custom like this, you'll need to utilize custom code or another 3rd-party plugin that can handle custom permalink structures.

If you'd like more information about using URL parameters, let me know and I can show you how to set up multiple taxonomy Query Filters with URL parameters.

#1594747

Ok Christian,
I Just contacted a programmer due to permalink issue

Now I need to know how to query multiple taxonomy via query filters, but I think I just know it via toolset.

I'll create archive views about type in elementor and use toolset search to choose the secondary taxonomy (city) it will append at the end.

In this case I'll made the programmer to retrieve the query var of the city and transform it in an endpoint.

At that point I should need how to retrieve via php these things:

1. Current taxonomy slug
2. Current taxonomy term (custom term)

I need them to generate seo titles and description to implement code the yoast seo plugin myself

#1595733

If you're looking for WordPress PHP API information, the WordPress site is your best source of information. You could use the get_queried_object API on an archive page to find out the term that is being queried in the current archive: https://developer.wordpress.org/reference/functions/get_queried_object/

#1595927

Sure, thank you. I'll see there.

I'd need the shortcode to show the current taxonomy slug to show these values in a "generated content" view

I mean:
- In the result of a search view

I would to show the respective values (name, custom term) of Type and City (created with toolset)

I'm building this site free for all to allow people to search nearest businesses for delivery in Italy, so i put here an question to be faster.

It's about map search.

I would custom address field:

- To receive data from the url
- To convert also long address to coordinates (to do not interpellate google maps api all the times)

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/how-to-use-a-url-parameter-with-address-field-and-bypass-google-maps-api/

#1597591

I'd need the shortcode to show the current taxonomy slug to show these values in a "generated content" view
So you mean you have a taxonomy archive page, and you would like to include a View in that page. In the results of this View, you would like to display or access the taxonomy term of the current archive page. Is that correct? If so, then use get_queried_object() to get all the information about the term of the current taxonomy archive. You can access the term_id, the taxonomy, etc.
From the documentation:
– On a category archive, tag archive, or other taxonomy archive page, it will return the WP_Term object of the current category, tag, or other term.
From that WP_Term, you can get the term slug, term name, etc.
https://developer.wordpress.org/reference/classes/wp_term/#user-contributed-notes

I would custom address field:
- To receive data from the url
- To convert also long address to coordinates (to do not interpellate google maps api all the times)

Let's break this into a separate ticket, since it is not related to taxonomy filters. We can discuss address cache and address filters in more detail.

The topic ‘[Closed] Multiple Taxonomy Filter’ is closed to new replies.