Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Custom Post Types
- add_action('init', 'create_myportfoliotype');
- function create_myportfoliotype() {
- $myportfoliotype_args = array(
- 'label' => __('Portfolio'),
- 'singular_label' => __('Portfolio'),
- 'public' => true,
- 'show_ui' => true,
- 'menu_position' => 5,
- 'capability_type' => 'post',
- 'hierarchical' => false,
- 'publicly_queryable' => true,
- 'query_var' => true,
- 'rewrite' => array( 'slug' => 'portfolio', 'with_front' => false ),
- 'can_export' => true,
- 'supports' => array(
- 'title',
- 'editor',
- 'post-thumbnails',
- 'custom-fields',
- 'page-attributes',
- 'author',
- 'thumbnail'
- )
- );
- register_post_type('myportfoliotype',$myportfoliotype_args);
- }
- //Taxonomias
- register_taxonomy("categories", array("myportfoliotype"), array("hierarchical" => true, "label" => "Category", "singular_label" => "Category", "rewrite" => true));
- register_taxonomy( 'tags', array("homepage"), array( 'hierarchical' => false, 'label' => 'Tags', 'query_var' => true, 'rewrite' => true ) );
- register_taxonomy( 'specifics', array("myportfoliotype"), array( 'hierarchical' => false, 'label' => 'Specifics', 'query_var' => true, 'rewrite' => true ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement