array( 'name' => __('Portfolio', 'nusantara'), 'singular_name' => __('Portfolio', 'nusantara'), 'all_items' => __('All Portfolio', 'nusantara'), 'add_new' => __('Add New', 'nusantara'), 'add_new_item' => __('New Portfolio', 'nusantara'), 'edit' => __( 'Edit', 'nusantara' ), 'edit_item' => __('Edit Portfolio', 'nusantara'), 'new_item' => __('New Portfolio Type', 'nusantara'), 'view_item' => __('View Portfolio', 'nusantara'), 'search_items' => __('Search Portfolio', 'nusantara'), 'not_found' => __('Nothing found fortfolio.', 'nusantara'), 'not_found_in_trash' => __('Nothing found portfolio in Trash', 'nusantara'), 'parent_item_colon' => '' ), 'description' => __( 'This is the portfolio custom post type', 'nusantara' ), 'public' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'show_ui' => true, 'query_var' => true, 'menu_position' => 8, 'menu_icon' => get_stylesheet_directory_uri() . '/inc/assets/images/icons/cpt.png', 'rewrite' => array( 'slug' => 'portfolio', 'with_front' => false ), 'has_archive' => 'portfolio', 'capability_type' => 'post', 'hierarchical' => false, 'supports' => array( 'title', 'editor', 'trackbacks', 'custom-fields', 'comments', 'thumbnail', 'author' ) ); register_post_type( 'portfolio' , $args ); } // now let's add custom tags (these act like categories) register_taxonomy( 'custom_tag', array('portfolio'), array('hierarchical' => false, 'labels' => array( 'name' => __( 'Portfolio Tags', 'nusantara' ), 'singular_name' => __( 'Portfolio Tag', 'nusantara' ), 'search_items' => __( 'Search Custom Tags', 'nusantara' ), 'all_items' => __( 'All portfolio Tags', 'nusantara' ), 'parent_item' => __( 'Parent Custom Tag', 'nusantara' ), 'parent_item_colon' => __( 'Parent Custom Tag:', 'nusantara' ), 'edit_item' => __( 'Edit Custom Tag', 'nusantara' ), 'update_item' => __( 'Update Custom Tag', 'nusantara' ), 'add_new_item' => __( 'Add New Custom portfolio Tag', 'nusantara' ), 'new_item_name' => __( 'New Custom Tag Name', 'nusantara' ) ), 'show_ui' => true, 'query_var' => true, ) ); $nusantara_meta_box_portfolio = array( 'id' => 'portfolio-meta-box-slider', 'title' => __('Portfolio Settings', 'nusantara'), 'page' => 'portfolio', 'context' => 'normal', 'priority' => 'high', 'fields' => array( array( 'name' => __('Action button one ', 'nusantara'), 'desc' => __('Enter text for button one ', 'nusantara'), 'id' => 'nusantara_actionb_one', 'type' => 'text', 'std' => '', ), array( 'name' => __('Button one URL Destination', 'nusantara'), 'desc' => __('Enter URL destination for button one', 'nusantara'), 'id' => 'nusantara_actionlink_one', 'type' => 'text', 'std' => '', ), array( 'name' => __('Action button two', 'nusantara'), 'desc' => __('Enter text for button two', 'nusantara'), 'id' => 'nusantara_actionb_two', 'type' => 'text', 'std' => '', ), array( 'name' => __('Button two URL Destination', 'nusantara'), 'desc' => __('Enter URL destination for button two', 'nusantara'), 'id' => 'nusantara_actionlink_two', 'type' => 'text', 'std' => '', ), array( 'name' => __('Description', 'nusantara'), 'desc' => __('Enter your descriptions', 'nusantara'), 'id' => 'nusantara_desc_portfolio', 'type' => 'textarea', 'std' => '' ), ), ); function nusantara_box_portfolio() { global $nusantara_meta_box_portfolio; add_meta_box($nusantara_meta_box_portfolio['id'], $nusantara_meta_box_portfolio['title'], 'nusantara_show_box_portfolio', $nusantara_meta_box_portfolio['page'], $nusantara_meta_box_portfolio['context'], $nusantara_meta_box_portfolio['priority']); } function nusantara_show_box_portfolio() { global $nusantara_meta_box_portfolio, $post; // Use nonce for verification echo ''; echo '
', ' | '; echo ""; break; //If Text case 'text': echo ' |
---|---|
', ' | '; echo ''; break; } } echo ' |