Posted By

Ben on 04/10/10


Tagged

php


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

crypticsoft


Wordpress Custom post type


 / Published in: PHP
 

Add a custom post type of news

  1. <?php
  2. function post_type_news() {
  3. register_post_type( 'New',
  4. array( 'label' => __('New'), 'public' => true, 'show_ui' => true ) );
  5. register_taxonomy_for_object_type('post_tag', 'News');
  6. }
  7. add_action('init', 'post_type_news');
  8. ?>

Report this snippet  

You need to login to post a comment.