WordPress

How to set up Custom Taxonomy and Custom Posts in WordPress? (part-1)

Wordpress make it easy to categorize your website content by the use of Custom Post Type UI Plugin. You create your own post types and categorize them by Custom Taxonomy. Download and install Custom Post Type UI Plugin in your WordPress site or blog.

After activating plugin, you will see Custom Post Type in left menu in wordpress site admin.

If you mouse over Custom Post types you will see Menu (Custom Post Types, Add New, Manage Post Types, and Manage Taxonomies). Click on Add New.

Enter Post Type Name, and click on Create Custom Post Type button. You can also set Advance label Options and Advance Options but if you don’t know them leave them as default.

I created custom post type name “Hotels”.

Enter Taxonomy Name; select your custom post type from Attach to Post Type checkbox options (In my case Hotels is custom post type) and Click on Create Custom Taxonomy button. You can also set Advance label Options and Advance Options but if you don’t know them leave them as default. I created Reservations as custom taxonomy.

Now you will find custom post type in left menu bar in admin.

Click on Add Hotel. You will find Add Hotel page same as regular add post page. Look at Reservation block in right side bar. It is same as Tags block.

If you required it as Category block then; you need to edit custom taxonomy. Click on Custom Post Types > Manage Taxonomy. Click on Edit from next page. You will see Advance Options in right side.

There is Hierarchical is set False. By default it is false. Change it to True and Save Custom Taxonomy. Now Add Taxonomy Term for your custom taxonomy. In this example we have Reservations as Custom Taxonomy so term for this. Click on Reservations from left menu bar.

This will almost same as Category section. Add any term and now click on Add Hotel. You will see Reservations block as following.

By default Custom Taxonomy and Custom Posts will not be shown on site. You need to customize you theme.

In next article you will find how to show custom taxonomy and post in your wordpress theme.

websourceblog

ReactJs, NodeJs, Amazon Web Services, Symfony, Laravel, CodeIgniter, Zend Framework, WordPress, Drupal, Magento, Angular

View Comments

  • Substantially the article is really the best on this laudable topic. I concur with your conclusions and will eagerly look forward to your future updates.Just saying thank you will not just be enough for the wonderful lucidity in your writing.

Recent Posts

How to reset WSL 2 user’s password?

You can easily reset WSL 2 users' password, by just following the following steps. Open…

2 months ago

DreamHost Web Hosting

DreamHost a web hosting company, founded in 1997. It is offering sort of hosting services,…

10 months ago

How to add submenu or menu in any specific menu option in WordPress programmatically?

Menus in WordPress are highly versatile and can be easily modified to change in your…

11 months ago

Laravel 8 error target class controller does not exist.

Laravel is famous and robust PHP framework, widely used in different type of projects. While…

1 year ago

Define Private Methods/Functions in Python Class.

Python is very powerful and famous language, which allow us to write code as per…

2 years ago

Working with dates in PHP.

In this article, I am going to show you how we can get specific dates…

2 years ago