Skip Navigation

[Resolved] I can’t get the views to only show custom posts from a taxonomy

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

Problem: After updating Toolset plugins, some Views are not filtered as expected. I am displaying only the results of these Views. In the past, the Views were filtered by taxonomy term using a Query Filter, but I am unable to modify the taxonomy Query Filters now. I see a message that these filters are controlled by front-end search, but I do not display any filters in these Views.

Solution: In this case, it seems that the Views were created with front-end search filters but those filters are not displayed on the front-end of the site. Those front-end filters should be removed first. Edit the Views and delete any taxonomy filter codes from the Search and Pagination panel. That will restore your ability to modify the taxonomy Query Filters, and you should then be able to select a specific term to use for filtering each View.

This support ticket is created 3 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)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by mattV-2 3 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#2073739

Tell us what you are trying to do?
The site was working fine but the toolset and other plugins were way out of date. So I've updated all of WP, plugins and also renewed my subscription for toolset and updated the toolset plugins.

All is fine apart from the fact that the views that I have at the bottom of certain pages are supposed to only show Projects (a custom post type) from a certain Project Type (a custom taxonomy for that custom post type). E.g. On the Petroleum page, the view at the bottom of that page used to only show the latest 2 Petroleum projects.

It's now showing the latest 2 projects from all of the projects (not just the Petroleum taxonomy).

Here's the link to that page: hidden link

Is there any documentation that you are following?

I can't find a tutorial for setting these up, but I had done a few years ago when I set it up originally. It has all be working fine (apart from the software being out of date). It's only been today when I've updated Toolset, that the views aren't showing the right Project Type.

when I look at the Views and edit one, in the Query Filter section it says Taxonomy Filter and in there says Select posts with taxonomy: (but there is no taxonomy showing). When I edit this filter it doesn't give me the chance to choose the taxonomy.

What is the link to your site?
The site is here: hidden link

I've got a full backup from last night, so it's safe for you to make changes.

The problem is the same with all the views where it's showing only on taxonomy. So these views:
Commercial
EV Charger
Industrial
Petroleum

Many thanks for your help,
Matt

#2073789

Hello, I will be glad to help restore the previous Query Filter functionality. Please keep in mind this is a public forum, and you should only share login credentials in private communication fields. For your security, I have removed the login credentials from the public post and saved them in a private area. Please stand by, I will take a closer look at the Views you mentioned and give you an update shortly.

#2073797

I can see that these 4 Views were created with front-end search filters for the Project Types taxonomy, but instead of showing the filters and results, only the results are displayed on the front-end using the view_display option like so:

[wpv-view name="petroleum" view_display="layout" limit="2" orderby="date"]

If you look in the Search and Pagination panel of the View editor screen, you can see code for the front-end filter like this:

[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="form-group">
	<label>[wpml-string context="wpv-views"]Project Types[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="project-type" type="radios" url_param="wpv-project-type"]
</div>
[/wpv-filter-controls]
[wpv-filter-end]

Similar front-end search control code exists in all 4 Views:
hidden link
hidden link
hidden link
hidden link

In previous versions of the software, the front-end controls code did not directly impact the Query Filter editor, but in recent versions these components are more tightly coupled. I suggest deleting the filter code from the wpv-filter-controls shortcode first. After deleting the filter controls, the Search and Pagination panels in each View should contain only the following code in each View:

[wpv-filter-start hide="false"]
[wpv-filter-controls][/wpv-filter-controls]
[wpv-filter-end]

After you delete these codes, you should then have the ability to edit the Project Type taxonomy Query Filters and select the correct term filter for each View. I can make these changes for you if you'd like, but I wanted to confirm first because I am not entirely sure whether these Views are used anywhere else on the site. Changing the filter configurations here could break those other locations unexpectedly. Let me know how you would like to proceed.

#2074687

Ah that's it! Thanks very much for your help and also for your detailed explanation. That was perfect. Thanks so much,
Matt