Skip Navigation

[Resolved] Create a dynamic filter of a view using the page it is show on

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to add a static filter to their view so that it can be filtered by the taxonomy of the current page.

Solution:

This can be done by following the instructions in our documentation below.
https://toolset.com/course-lesson/passing-arguments-to-views/

This support ticket is created 3 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by adriS 3 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#2193063

Tell us what you are trying to do?
This website is a tourism directory. So I want to create a view for accommodation that can be used on all the town' accommodation pages. But it would use the page it displaying on's custom taxonomy for the towns.

So the page Aberdeen Accommodation I want to place the Accommodation Directory view and it should only show accommodations (post type stay) that also have the same custom Town's taxonomy

Is there any documentation that you are following? Can not find

Is there a similar example that we can see? https://toolset.com/forums/topic/custom-taxonomy-dynamically-choose-all-filter/ but I do not understand it, don't think it is exactly what I have in mind.

What is the link to your site? hidden link
Bit I do not have content yet to display

#2193203

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Adri,

Thank you for getting in touch.

For filtering a view based on the current page's taxonomy I would recommend the instructions in the link below.
https://toolset.com/course-lesson/passing-arguments-to-views/

If you're having any issues please let me know.
Thanks,
Shane

#2193855

My issue is resolved now. Thank you!