1. //Custom Post Types
  2. add_action('init', 'create_myportfoliotype');
  3. function create_myportfoliotype() {
  4.     $myportfoliotype_args = array(
  5.         'label' => __('Portfolio'),
  6.         'singular_label' => __('Portfolio'),
  7.         'public' => true,
  8.         'show_ui' => true,
  9.         'menu_position' => 5,
  10.         'capability_type' => 'post',
  11.         'hierarchical' => false,
  12.         'publicly_queryable' => true,
  13.         'query_var' => true,
  14.         'rewrite' => array( 'slug' => 'portfolio', 'with_front' => false ),
  15.         'can_export' => true,
  16.         'supports' => array(
  17.             'title',
  18.             'editor',
  19.             'post-thumbnails',
  20.             'custom-fields',
  21.             'page-attributes',
  22.             'author',
  23.             'thumbnail'
  24.           )
  25.        );
  26.   register_post_type('myportfoliotype',$myportfoliotype_args);
  27. }
  28.    
  29.    
  30. //Taxonomias
  31. register_taxonomy("categories", array("myportfoliotype"), array("hierarchical" => true, "label" => "Category", "singular_label" => "Category", "rewrite" => true));
  32. register_taxonomy( 'tags', array("homepage"), array( 'hierarchical' => false, 'label' => 'Tags', 'query_var' => true, 'rewrite' => true ) );
  33. register_taxonomy( 'specifics', array("myportfoliotype"), array( 'hierarchical' => false, 'label' => 'Specifics', 'query_var' => true, 'rewrite' => true ) );