示例#1
0
 function register()
 {
     // Init Post Type
     $args = array('supports' => array('title', 'editor', 'thumbnail'), 'has_archive' => false, 'exclude_from_search' => false, 'rewrite' => array('slug' => get_setting('portfolio-slug', 'portfolio')), 'menu_icon' => 'dashicons-portfolio');
     $post = new SpyropressCustomPostType(__('Portfolio', 'spyropress'), '', $args);
     // Add Taxonomy
     $post->add_taxonomy(__('Category', 'spyropress'), 'portfolio_category', __('Portfolio Categories', 'spyropress'), array('hierarchical' => true));
     $post->add_taxonomy(__('Services', 'spyropress'), 'portfolio_service', __('Services', 'spyropress'), array('hierarchical' => false));
     // Add Meta Boxes
     $meta_fields['portfolio'] = array(array('label' => __('Portfolio', 'spyropress'), 'type' => 'heading', 'slug' => 'portfolio'), array('label' => __('Project URL', 'spyropress'), 'id' => 'project_url', 'type' => 'text'), array('label' => __('Client', 'spyropress'), 'id' => 'project_client', 'type' => 'text'), array('label' => __('Client Testimonial', 'spyropress'), 'id' => 'project_testimonial', 'type' => 'textarea', 'rows' => 7), array('label' => __('Showcase Type', 'spyropress'), 'id' => 'p_type', 'type' => 'select', 'options' => array('gallery' => __('Gallery', 'spyropress'), 'video' => __('Video', 'spyropress')), 'class' => 'enable_changer'), array('label' => __('Gallery', 'spyropress'), 'desc' => __('Click to upload images', 'spyropress'), 'id' => 'gallery', 'type' => 'gallery', 'class' => 'p_type gallery'), array('label' => __('Video', 'spyropress'), 'id' => 'video', 'type' => 'textarea', 'rows' => 5, 'class' => 'p_type video'));
     $post->add_meta_box('portfolio', __('Portfolio Details', 'spyropress'), $meta_fields, false, false, 'normal', 'high');
 }
示例#2
0
 function register()
 {
     // Init Post Type
     $args = array('supports' => array('title', 'editor'), 'title' => __('Enter question here', 'spyropress'), 'has_archive' => false, 'exclude_from_search' => true);
     $post = new SpyropressCustomPostType(__('FAQ', 'spyropress'), 'faq', $args);
     // Add Taxonomy
     $post->add_taxonomy(__('FAQ Category', 'spyropress'), 'faq_category', __('Categories', 'spyropress'), array('hierarchical' => true));
 }
示例#3
0
 function register()
 {
     // Init Post Type
     $args = array('title' => __('Enter name here..', 'spyropress'), 'public' => false, 'supports' => array('title', 'thumbnail'), 'menu_icon' => 'dashicons-admin-users');
     $post = new SpyropressCustomPostType(__('Staff', 'spyropress'), 'staff', $args);
     $post->add_taxonomy(__('Designation', 'spyropress'), '', '', array('hierarchical' => true));
     // Add Meta Boxes
     $meta_fields['staff'] = array(array('label' => __('Staffs', 'spyropress'), 'type' => 'heading', 'slug' => 'staff'), array('label' => __('About', 'spyropress'), 'id' => 'about', 'type' => 'editor', 'rows' => 6), array('label' => __('Social', 'spyropress'), 'type' => 'repeater', 'id' => 'socials', 'item_title' => 'network', 'fields' => array(array('label' => __('Network', 'spyropress'), 'id' => 'network', 'type' => 'select', 'options' => spyropress_get_options_social()), array('label' => __('URL', 'spyropress'), 'id' => 'url', 'type' => 'text'))), array('label' => __('Link to Page', 'spyropress'), 'id' => 'link_page', 'type' => 'page'));
     $post->add_meta_box('staff_info', __('Mate Information', 'spyropress'), $meta_fields, '_mate_info', false);
 }
 function register()
 {
     // Init Post Type
     $args = array('supports' => array('title', 'thumbnail'), 'title' => __('Enter name here..', 'spyropress'), 'has_archive' => false, 'exclude_from_search' => true);
     $post = new SpyropressCustomPostType(__('Testimonial', 'spyropress'), 'testimonial', $args);
     // Add Taxonomy
     $post->add_taxonomy(__('Testimonial Category', 'spyropress'), '', __('Categories', 'spyropress'), array('hierarchical' => true));
     // Add Meta Boxes
     $meta_fields['testimonial'] = array(array('label' => __('Testimonial', 'spyropress'), 'type' => 'heading', 'slug' => 'testimonial'), array('label' => __('Testimonial', 'spyropress'), 'id' => 'testimonial', 'type' => 'editor'), array('label' => __('Designation', 'spyropress'), 'id' => 'designation', 'type' => 'text'), array('label' => __('Company', 'spyropress'), 'id' => 'website', 'type' => 'text'));
     $post->add_meta_box('testimonial_info', __('Testimonial', 'spyropress'), $meta_fields, '_testimonial', false, 'normal', 'high');
 }