How to Create Hierarchical Directory for Nation Wide Mental Health Services

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

require('my_custom_posts.php');

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:

https://codex.wordpress.org/Post_Types

Taxonomies:

https://codex.wordpress.org/Taxonomies

Leave a Comment