Skip Navigation

Setting up custom post types, fields and taxonomy needed for directory sites

The first thing to do when building a directory website is to create its structure. You do this by creating custom post types, adding custom fields and using custom taxonomy to categorize your content.

Creating a Custom Post Type

Every directory site will require a new "custom post type", to hold the listings (like a "cars" custom post type if you're creating a car dealership site).

Creating Custom Fields

Add the custom fields for the information that items in your directory need. For example, if you're creating a car dealership site, you may fields for "year made" and "price".

Creating a Custom Taxonomy

Add custom taxonomy to organize the items in the directory. For example, you could create a taxonomy for "car type", which will group "sport cars", "economy cars" and SUVs.

Adding Custom Posts

Once you've created the custom post types, fields and taxonomy, it's time to populate your directory site with some content. You'll need this sample content to design the site's front-end in the next chapter.