Create register post type function in Wp plugin.

WordPress Post Type Function

post type function

In Previous article we discussed about wordpress plugin creation, for more info please follow below links for wordpress plugin development.

In this session we discuss about wordpress register post type function, which we can use this function in plugins and themes, before that we need to know this register_post_type() will only invoked ‘init’ action. This will not work if we call this function before init action.

WordPress uses following post types already, there are..
 post
 page
 attachment
 revision
 nav_menu_item

Some of the post types should not use, because they interfere with other WordPress functions, there are…
 action
 author
 order
 theme

Now we will create a sample register_post_type() example as below.

For more information you can go to below link as reference Post type function. Thanks.

READ  Top 5 affiliate marketing plugins for wordpress based websites

2 Comments

  1. marvel contest of champions hack ios June 28, 2016
  2. rhea.cobby October 18, 2016

Leave a Reply