wordpress custom post type


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. add_action('init', 'post_type_actions_culturelles');
  2. function post_type_actions_culturelles() {
  3. register_post_type( 'actions_culturelles',
  4. 'label' => __('Actions'),
  5. 'public' => true,
  6. 'show_ui' => true,
  7. 'hierarchical' => false,
  8. 'capability_type' => 'post',
  9. 'supports' => array( 'title', 'editor', 'thumbnail'),
  10. 'rewrite' => array('slug' => 'actions-culturelles', 'with_front' => false)
  11. ));
  12. register_taxonomy_for_object_type('post_tag', 'actions_culturelles');
  13. }

URL: http://codex.wordpress.org/Custom_Post_Types

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.