Skip Navigation

[Resolved] locations with multiple categories selected problem

This support ticket is created 6 years, 7 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by weatherlyB 6 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#906315

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).

#906626

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

#906851

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

#907249

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

#908002

Thanks for the details, I am downloading the file, will feedback if there is anything found

#908003

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/

#908499

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