[Resolved] Views filter set by taxonomy of the page where it is displayed not working
This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is the user's Views filter set by taxonomy of the page is not working.
Solution:
In this case the user had some custom code that is causing the query to not work. If there are any custom code on your site relating to taxonomy please remove it temporarily and try again.
This support ticket is created 6 years, 11 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.
I am trying to: show the body of a custom post type called: top-ad on a single view of a post type called supplier.
Both share the same taxonomy: supplier-category
I want to filter it so that only ads display that are linked to any of the same categories as the supplier on which this banner is being displayed.
Link to a page where the issue can be seen: hidden link
I expected to see: The banner, as in: hidden link
Instead, I got: the body content of a random supplier(not the body content of the top-ad)
This is extremely weird for me, and makes now sense.
So to get a clear understanding of this. You want to filter a view by the taxonomy of the current page being displayed and you also want the text below the menu to not show.
Could you let me know which view this is that you are having issues with ?
So to get a clear understanding of this. You want to filter a view by the taxonomy of the current page being displayed - YES
The text showing, is from some random suppliers, when the view that is inserted there is actually for top-ads. You see it shouldn't be displaying anything from suppliers there since it is not a view for suppliers. It is supposed to be showing the content from top-ads, which basically contains a shortcode that generates a banner. (like in the example page I sent you. It works here because there is no filter on taxonomy. The moment I add that it breaks the whole view.)
I see the major issue here. There might be something wrong with the view itself and as such I would recommend that you remove this view and then recreate it and let m e know if the issue still remains.
It could also be from a plugin conflict so if the recreating of the view does not work I would suggest temporarily disabling all your non-toolset plugins and then try again.
I need to get this working ASAP or at lest a workaround to get it working for nw would be fine. Some PHP script for a shortcode could even be a solution.
Ah I see. I added that code initially to remove another custom post type that was displaying amongst my suppliers because it was using the same taxonomy.
I will test it properly and let you know if all is well.
OK so now I need help in removing the other posts using the same taxonomy from my suppliers and decorlogue category archive pages. For example: hidden link
"American Shutters Top Ad" is a new post type I created called Top Ad. I use it as a container for the top banners on these supplier and decorlogue pages and category pages. They share the same taxonomy so that I can show ads specific to a certain category on the supplier category pages. How do I change this so that the ads don't show up on these category pages?