Skip Navigation

[Resolved] Filtering View by Taxomomy: Fileter set by page where the view is inserted

This support ticket is created 2 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
- 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 Charlie 2 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2319159

Regarding Amir's article
https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/
It is possible to filter by a taxonomy set by the page which displays the view.
But there is no explanation as to how this is done i.e. where to set the taxonomy filter inside the page displaying the view.

#2319173

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Yes, there is that option and its already there with the Doc you shared:
- https://toolset.com/documentation/user-guides/views/filtering-views-by-taxonomy/

Value set by the current page where this View is shown
===============================================
The View is always inserted somewhere. That page where the View is inserted is responsible for setting the taxonomy term. This is good when you want the same View to return different results, according to the page it’s inserted to.

As shared with the Doc, you should navigate to "Query Filter" section when you edit your view. I would like to know are you using block view or classic view?

#2319185

Hi Minesh
I am using th e Tooslet Views block to insert an existing View which I had set up to get the filter taxonomy from the page.
However, I cannot see a block option to set the taxonomy filter.

#2319239

Minesh
Supporter

Languages: English (English )

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

When you select your view block - on right sidebar you will see a "Content Selection" tab and within that tab you will notice that there is a button available to add query filter. Please check the following screenshot:
- hidden link

#2319725

You only see the selection and filtering options in the block in which the view is created.
If you add the view in a Content Template and then assign the template to a page then it does not offer any filtering options.
Likewise if your add the view to a page using the views block there is no filtering option.

#2319755

My issue is resolved now.

I had to ensure that the post used to display the Content Template containing the View had the same taxonomy assigned to it as the posts to be filtered.
The View picks up the taxonomy and applies it to the View.

My View now works as intended.

Thanks