Skip Navigation

[Resolved] How to get selected terms in taxonomy filter?

This support ticket is created 6 years, 4 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 4 replies, has 2 voices.

Last updated by Himanshu Agarwal 6 years, 4 months ago.

Assisted by: Nigel.

Author
Posts
#919825

I have a taxonomy filter in custom taxonomy archive page but all terms are not showing in filter, only current term is showing.

How to show all selected terms of posts in taxonomy filter for taxonomy archive page?

#919857

Nigel
Supporter

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

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

Hi there

It logically does not make sense to add a taxonomy custom search filter to a taxonomy archive page because there is already an effective filter in place for the current taxonomy term for which this archive is.

For example, if you have a city taxonomy and you are viewing the archive for Madrid at site.com/city/madrid/ which shows posts that have the term Madrid, it does not make sense to include a filter on that page where users can search for posts about Paris. (But it might make sense on such a page to include a filter for a custom field to only show posts which are 'featured' which is why it is possible to create custom searches on archive pages.)

For something like that you should create a static page and include a View where the user can choose the term in a filter to show such posts, and can update the filter to change the results.

#920149

Yes Nigel you are right.

But is there any way to get this (taxonomy filter in taxonomy archive page).

#920160

Nigel
Supporter

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

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

No, because the results at the taxonomy archive URL are generated by WordPress according to the term in the URL. Any filters (e.g. custom field filters) which Views then applies on that page narrow-down the initial set of results. Clearly, you can't narrow down the city/madrid results to city/paris, you need a completely different set of results (which are generated at the city/paris URL).

Hence filtering by the taxonomy needs to be done with a View on a static page, not on the archive itself.

#920170

Thank you Nigel.