I am trying to:
Have it show just the one category results, even if that location is listed under other categories as well.
Link to a page where the issue can be seen:
hidden link
I expected to see:
Just the one category results. For example, this one is working correctly: hidden link
Instead, I got:
By setting up a new category and a new 'location' post I found that the view worked fine that way. But add another the post to a second location category and it then dragged in all those results from the other category. I create a new 'Battlefields Test Category' and put in a new 'just a test battlefield' in with ONLY that new category and it works fine. But if I add in, say, cemeteries to its list of categories., suddenly posts from the cemeteries category appear under Battlefield, even though they do NOT have that category selected).
Hello,
I assume we are talking about the archive page of taxonomy "Location", please check these:
1) Make sure you are following our document to setup the wordpress archive for taxonomy "Location":
https://toolset.com/documentation/user-guides/normal-vs-archive-views/
2) in case it is a compatibility problem, please try this:
deactivate other plugins and switch to wordpress default theme, and test again
The primary locations page works fine. It is ONLY that one sub sub category section that is linked in the side menu does not. Plugins aren't affecting it.
• Parent category (works property)
• Sub-category (works property)
• Sub-category (not working properly)
If a Battlefield post is in not only Battlefields but some other category, like Museum, then it seems to drag it in. I tested this by only having ONE post in an all-new test category with nothing else.
Not working example: hidden link
Test comparison:
hidden link
I assume you have already checked the compatibility problem, if the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, also point out where and how can I see the problem:
suddenly posts from the cemeteries category appear under Battlefield
Which one is the problem post should not be displayed in the URL:
hidden link
I need to test and debug it in my localhost, thanks
Thanks for the details, I am downloading the file, will feedback if there is anything found
Here is what I found:
1) You are using a normal post view "View for Location Archives" to display the archive page of taxonomy "Location Categories", it will conduct some unexpected result, see my first answer:
https://toolset.com/forums/topic/locations-with-multiple-categories-selected-problem/#post-906626
2) For example, you can try this:
Edit the layout "New Layout for Locations"
hidden link
replace the post view cell with a wordpress archive cell, and test again, see our document:
https://toolset.com/documentation/user-guides/wordpress-archive-cell/
After spending days going back and forth with you and reading your links and following your suggestions nothing made any difference. So I spent several more hours on my own just experimenting with different settings and I finally got it fixed. It was one simple setting I wish you could have told me.
For anyone else who has this problem in the future... Instead of this:
Query Filter > Taxonomy filter > Select posts with taxonomy: Location Categories the same as the page where this View is shown
I changed it to this:
Query Filter > Taxonomy filter > Select posts with taxonomy: Location Categories the same as the current archive page