Setting ACF for Category and for all subcategories
I’m building a website with multiple categories and subcategories, and some of those categories need some advance custom fields to work properly, and for them to have the necessary data i need to be filled.
The Problem
I’m trying to apply some advance custom fields, to all articles created with the category product or any of it’s subcategories.
ex: Main category “Product” or subcatgory “Bed”.
But since i have to create rules to the advance custom field (see image bellow)
I wanted to give the rules to the parent category , in this case “Products” and then make it apply to the all sub-categories.
The Problem
So, since i haven’t found a solution for the problem i thought that i could give the parent category and sub-category to the article i was creating, and then the article would have the advance custom fields. That part worked, but the url of the article is now different.
Instead of being:
website.com/products/subcategory/name-of-the-article
It is now:
website.com/products/name-of-the-article
Is there anyway to create a rule to acf to apply the rules to all subcategories or is there any way to change the url ?
Thanks in advance !
Leave an answer