I have a lot of Pages
which can be (need to be) grouped under a number of different Categories. ** Then the more important thing is, i need to control those pages (of different groups) programatically via functions.php
.
Lets say, i would have:
- Page A (Categorized as:
Fruits
) - Page B (Categorized as:
Vehicles
) - Page C (Categorized as:
Vehicles
) - Page D (Categorized as:
Fruits
) - Page E (Categorized as:
Technology
)
Then from functions.php
, there would be some logics, like:
- If Page is under
Fruits
Category, thenecho "This is related to Fruits.";
. - If Page is under
Vehicles
Category, thenecho "This is related to Vehicles.";
. - If Page is under
Technology
Category, thenecho "This is related to Technologies.";
.
I dont know this is about Taxonomy or Tagging or Custom Field or something. But:
- What is the ideal way to do it please? (Especially to be able to control from backend coding.)
And again please let me repeat, "Pages". (Not about Posts or any other)
Pages
.