how to get expression engine categories with different tag like child category and parent category using custom class in php.


{parent category} - should show all parent.
{child category} - should show all child for any depth weather the parent are not passed from parameter.
  • Hi! Can you please, help us to help you? You have three questions about the same topic. Please, merge all of them into this one. Put all info together and explain how much you already know about EECMS. Thanks!
    – Sobral
    May 12, 2014 at 17:06

2 Answers 2


You haven't supplied much info, would this module be of benefit: http://gwcode.com/add-ons/gwcode-categories/examples/example1

  • no i want to do this with custom class ..... May 12, 2014 at 8:17
  • Cool, as this is your first question, maybe expand your question so others can answer your specific needs. May 12, 2014 at 8:57
  • i just want to make a class in php which extract all categories from database and can get the categories in a template by passing parameters like {child category} May 12, 2014 at 9:15

It looks like you want to reinvent Category Parents add-on. If you want to reproduce the functionality in your own add-on, use the code as an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.