I have a site with around 8000 products, with a slightly poor site structure - instead of custom taxonomies the Brand Name and Retailer are Parent Categories with the various individual brands, and retailers as sub categories.
Brands (Cat ID 187 - around 300 brands as sub cats)
- Brand 1
- Brand 2
- Brand 3 etc
Retailers (Cat ID 186 - around 20 retailers as sub cats)
- Retailer 1
- Retailer 2
- Retailer 3 etc
I have a list of the individual brands and retailers individual subcat IDs, and for site maintenance was wondering if there was a way to display all posts which are accidentally assigned to more than one retailer, or more than one brand?
I've found solutions for locating all posts assigned to 2 specific categories, but not any that can display posts which appear in any 2 of the categories featured in a long array.
Or alternatively any posts which belong to 2 or more sub categories of a certain parent ID - if that's less complicated than one long array of sub cat IDs?
It doesn't matter if it's slow, as it's only me who'll be seeing the output in order to maintain the website.
If anyone can give me any pointers, I'd be very grateful - Thank you in advance :)
Joey
Edit: The only quick solution I can think of would be to output all posts IDs with a comma separated list of categories that they belong to, then remove all the non relevant categories with search and replace (or do this with the initial query), and then import this data into Excel and see which posts had more than 2 columns for Brand and Retailer? Was wondering if there was a more elegant solution than this? Thanks