I'm to build a hierarchical directory for an online portal of nation wide mental health services. Is there any suitable option in WordPress?

I've already created the news portal section of that site but the directory is still to be built very soon.

This directory will include hierarchical links to the info about psychiatrists, daily or weekly doctors' chambers, both government and private mental hospitals etc.

Each link will be opened up with the necessary and relevant information of any particular mental clinic, hospital or doctor.

Admin will update hospital and clinic info. But doctors will have the access to their own information to edit it.

What should be the best option for developing this categorized and hierarchical directory?

1 Answer 1


First of all, in WordPress here the best option to solve my problem is using Custom Post Types and Custom Taxonomies.

To do that, I've created a file named "my_custom_posts.php" and put it inside the theme's root folder. Then I've included this file in my "functions.php" using


You can also put your custom post type declaration codes directly into your 'functions.php'. If you're following my steps, just to keep one thing in your mind that no matter where you've written your code you've to reference that properly to make sure it'll work right for you. The same process is also applicable for defining custom taxonomies.

Then you're to write your code for custom post types and custom taxonomies in that specific place you've allocated for.

I should mention that I've also used WordPress's another most powerful feature named custom meta box along side the custom post types and custom taxonomies. WordPress Custom Meta Box will allow you to create and use complex post types and templates as you require and as far as you can imagine. Meta Boxes are options which are appeared in admin screens and can be dragged and re-positioned as you like. It can take input via one or a group of custom fields (WordPress's core feature) which can be used later as the way you want. But the custom field(s) in a custom meta box are labeled box that take input as meta-key and meta-value pairs.

For building process you'll find following links to be very helpful.

Post Types:




  • So are you answering your own questions? LOL.
    – Johann
    May 5, 2015 at 20:19
  • @Johann Yeah, but still my answer is incomplete because I'm not able to put more than 2 links in my answers until I get 10 rep points. May 5, 2015 at 20:22

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.