1. Easy Post Types & Fields
  2. Getting Started

Creating Custom Post Types, Fields and Taxonomies

This article explains how to use the free Easy Custom Post Types and Fields plugin to:

  1. Create a custom post type.
  2. Add custom fields and taxonomies to your new custom post type.
  3. Add data to the new fields that you created.
  4. Add custom fields and taxonomies to an existing post type (such as WooCommerce products or Events Calendar events).

Create a custom post type

  1. Go to the 'Post Types' area in the WordPress admin, and click 'Add New'.
  2. Follow the instructions onscreen to add the information for your post type:
    • Singular name - How you will refer to the post type in the singular, e.g. Product, Article, or Resource.
    • Plural name - How you will refer to the post type in the plural, e.g. Products, Articles, or Resources.
    • Features - Select which features and fields of information you will use to store information about the custom posts. These are all the standard fields which are part of WordPress itself. (To create additional fields, see the instructions for creating custom fields below.)
  3. Click 'Create'. This will finish creating the custom post type.
  4. On the final screen of the post type creation wizard, you can choose whether to create custom fields, custom taxonomies, start adding posts straight away, or go back to the list of post types.

Note for developers: To avoid conflicts with other parts on your site, the plugin adds an ept_ prefix to the beginning of the custom post type slug behind the scenes. You don't need to use this if you're displaying the information using Posts Table Pro, but you will need it to retrieve it using other methods.

Adding posts

Once you have created a post type, it will appear as a new section on the left hand side of the WordPress admin. Hover over this and click the 'Add New' link to add your first custom post.

Adding extra fields

After creating a new post type, you can add custom fields and taxonomies to it. These appear on the 'Add Post' screen, in addition to the standard features which you enabled in step 2, above.

Custom fields are used for storing unique data about each post, and appear under the post editor. Taxonomies are used for grouping and organizing your posts, and appear on the right like normal WordPress categories and tags. If you're not sure whether to use custom fields or taxonomies, check out this advice.

Custom fields

Go to Post Types and click the 'Custom Fields' link for your post type. Click 'Add New' and enter the following information:

  • Name - Enter a name for the custom field. This will appear above the field on the 'Add/Edit' screen for your custom post type.
  • Slug - Enter a slug for the custom field (lowercase without spaces, e.g. "reference-number"). This will not appear on your website. You might need it if you are working with the custom field in other ways, for example displaying it in a table using Posts Table Pro.
  • Type - Select a field type:
    • Text - Use this for fields where you only need to enter plain text.
    • Visual Editor - Use this for any type of field where you want to enter more advanced information. This field type is incredibly versatile and can be used in many ways, including:
      • Images - Use the Add Media button to add an image.
      • Links - Add the anchor text, highlight it, and use the 'Link' toolbar button to create the hyperlink.
      • Other - You can basically add anything you like to a Visual Editor Field. Formatted text, buttons, shortcodes from other plugins, and more.

Once you have added your custom fields, they will appear underneath the post editor when you add a new post.

Note for developers: To avoid conflicts with other parts on your site, the plugin prefixes ept_ to the beginning of the slug behind the scenes (so if you enter year for a custom field on a post type called 'Article' then the actual slug will be ept_article-2_year). You don't need to use this if you're displaying the information using Posts Table Pro, but you will need it to retrieve it using other methods. 

Custom taxonomies

Go to Post Types and click the 'Taxonomies' link for your post type. Click 'Add New' and enter the following information:

  • Singular name - Enter a name for the custom taxonomy, e.g. 'Brand'. This will appear above the field on the 'Add/Edit' screen for your custom post type.
  • Plural name - Enter a name for the custom taxonomy, e.g. 'Brands'. This will appear above the field on the 'Add/Edit' screen for your custom post type.
  • Slug - Enter a slug for the custom taxonomy (lowercase without spaces, e.g. "reference-number"). This will appear as part of the URL if you are using taxonomy archive pages. You might need also it if you are working with the taxonomies in other ways, for example to allow users to filter by the taxonomy in Posts Table Pro.
  • Hierarchical - Choose whether or not you want the taxonomy to be hierarchical. Hierarchical taxonomies behave like WordPress categories, where you can structure them into parent and sub-category relationships. Non-hierarchical taxonomies behave like WordPress post tags, where all the items are on the same level and can't be nested or indented into a tree structure.

Once you have added your custom taxonomies, they will appear on the right hand side of the post editor when you add a new post. There is also a separate page for managing your taxonomy terms centrally, which you can find at [Your Post Type] → [Taxonomy Name].

Note for developers: To avoid conflicts with other parts on your site, the plugin prefixes ept_ to the beginning of the slug behind the scenes (so if you enter year for a taxonomy on a post type called 'Article' then the actual slug will be ept_article-2_year). You don't need to use this if you're displaying the information using Posts Table Pro, but you will need it to retrieve it using other methods. 

Taxonomy archive pages

The Easy Post Types and Fields plugin automatically creates an archive page which lists all the posts which use a particular taxonomy term. To access this, go to [Your Post Type] → [Taxonomy Name], hover over the term that you want to view the archive page for, and click the 'View' link.

The design and layout of archive pages will use the same template as the blog category pages in your WordPress theme. If you'd prefer a more structured way of listing them, complete with the ability for users to filter by taxonomy term, then we recommend using the Posts Table Pro plugin instead of archive pages.

Add custom fields and taxonomies to an existing post type

You can also use the plugin to add custom fields and taxonomies to existing post types, which have been created using other post types such as WooCommerce products, Events Calendar events, and so on.

Custom fields are used for storing unique data about each post, and appear under the post editor. Taxonomies are used for grouping and organizing your posts, and appear on the right like normal WordPress categories and tags. If you're not sure whether to use custom fields or taxonomies, check out this advice.

Custom fields

Go to Post Types → Other Post Type and click the 'Custom Fields' link for the post type that you wish to extend. You will see any the existing custom fields listed here. Any fields that you previously created using 'Easy Post Types and Fields' will be listed with a clickable 'Edit' link. Fields created using another plugin will be read-only because they are not editable.

To add a new custom field, click 'Add New' and enter the following information:

  • Name - Enter a name for the custom field. This will appear above the field on the 'Add/Edit' screen for the post type.
  • Slug - Enter a slug for the custom field (lowercase without spaces, e.g. "reference-number"). This will not appear on your website. You might need it if you are working with the custom field in other ways, for example displaying it in a table using Posts Table Pro.
  • Type - Select a field type:
    • Text - Use this for fields where you only need to enter plain text.
    • Visual Editor - Use this for any type of field where you want to enter more advanced information. This field type is incredibly versatile and can be used in many ways, including:
      • Images - Use the Add Media button to add an image.
      • Links - Add the anchor text, highlight it, and use the 'Link' toolbar button to create the hyperlink.
      • Other - You can basically add anything you like to a Visual Editor Field. Formatted text, buttons, shortcodes from other plugins, and more.

Once you have added your custom fields, they will appear underneath the post editor when you add a new post/product/event/other.

Custom taxonomies

Go to Post Types → Other Post Types and click the 'Taxonomies' link for the post type that you wish to extend. You will see any the existing custom taxonomies listed here. For example, WooCommerce products already have lots of taxonomies built-in. Any fields that you previously created using 'Easy Post Types and Fields' will be listed with a clickable 'Edit' link. Fields created using another plugin will be read-only because they are not editable.

To add a new taxonomy, click 'Add New' and enter the following information:

  • Singular name - Enter a name for the custom taxonomy, e.g. 'Brand'. This will appear above the field on the 'Add/Edit' screen for the post type.
  • Plural name - Enter a name for the custom taxonomy, e.g. 'Brands'. This will appear above the field on the 'Add/Edit' screen for the post type.
  • Slug - Enter a slug for the custom taxonomy (lowercase without spaces, e.g. "reference-number"). This will appear as part of the URL if you are using taxonomy archive pages. You might need also it if you are working with the taxonomies in other ways, for example to allow users to filter by the taxonomy in Posts Table Pro.
  • Hierarchical - Choose whether or not you want the taxonomy to be hierarchical. Hierarchical taxonomies behave like WordPress categories, where you can structure them into parent and sub-category relationships. Non-hierarchical taxonomies behave like WordPress post tags, where all the items are on the same level and can't be nested or indented into a tree structure.

Once you have added your custom taxonomies, they will appear on the right hand side of the post editor when you new post/product/event/other. There is also a separate page for managing your taxonomy terms centrally, which you can find at [Post Type] → [Taxonomy Name].

How to display your custom post types, fields and taxonomies

Once you have finished adding the custom content types to your site, it's time to display them on your website.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.