I’ve searched and searched for this and i just don’t seem to know how to ask the question correctly to get results that actually answer my question.
I’m wanting to set up ACF so that whatever field groups i have created will appear on different groupings of products based on their category, or some kind of taxonomy or tag (or whatever works).
So, post types = Product (WooCommerce) which works fine, but then i only want it to show on product pages that are in whichever Category i pick, so i can have different field groups show up for different categories of products.
The results i have seen seem to be about showing the fields on category pages, which i don’t want. I just want to be able to designate the field groups by product type to show on those products only.
I’ve tried a bunch of exiting filters and added some as php snippets, which then seem to add what looks like the right drop down, but doesn’t work.
I probably just don’t understand what the right question is to ask as so many similar questions seem out there for something slightly different. Or is this only a pro feature? Any help in the right direction would be great. If this works out well i can probably convince my budget department to make a purchase.
I just tried it as I suggested, and it does indeed work like that… I selected the “product_cat” Mix N Match as in my example and my new test field, only shows in my products that belong to that specific category.
Rather than selecting each individual subcategory of it, tho, I editted my products to be included in that parent category as well.
I should have followed up on this for others having an issue.
Thanks @kpirnie for the suggestions.
It turns out the solution was simple and straightforward, but that there was a lot of obfuscation going on to see it due to the drop down listing a few hundred other options for filtering. The list included attributes and keywords and everything else you can think of so i was trying to sort through a massive list of choices and didn’t initially realize there was a separate taxonomy selection for WooCommerce’s version of “product_cat”.
The confusing aspect is that the taxonomy selection that comes up first just simply doesn’t work using the AND option. It would be nice if this was made more clear, or if selections that will do nothing are simply not displayed. I’m not sure how doable that would be, so it might not be that simple. So when i realized there was a separate taxonomy selection, but that is was buried hundreds of selections down, it worked just fine. Under the “product_cat” section, i was able to select the category i has chosen for the product.
So it would be as follows:
Post type = Product
AND Taxonomy = [whichever one you have assigned]
But ignore the initial listing of taxonomy or category, and find the one specifically for “product_cat” for WooCommerce.
So it was as easy as it should have been, but hidden in plain site by a bunch of irrelevant selection options.
My last response seems to have disappeared. It turns out it was using “product_cat”, but that it was buried under hundreds of other choices (attributes, key words, etc). So it just wasn’t as obvious as it could have been.
Would be nice if they also didn’t show the taxonomy options that don’t do anything, as it makes it look like you’d just choose the first options for categories. When i realized i had to scroll down through hundreds of options to find the WooCommerce version, it all worked fine and as expected.
The topic ‘Display field group only on products using a specific category’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!