Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function register_partner_custom_post_type()
- {
- /**
- * Dichiarazione delle etichette
- */
- $labels = array(
- 'name' => __( 'Partners', 'textdomain' ),
- 'singular_name' => __( 'Partner', 'textdomain' ),
- 'add_new' => __( 'Aggiungi nuovo', 'textdomain' ),
- 'add_new_item' => __( 'Aggiungi nuovo Partner', 'textdomain' ),
- 'edit_item' => __( 'Edit', 'textdoamin' ),
- 'new_item' => __( 'Nuovo Partner', 'textdoamin' ),
- 'all_items' => __( 'Tutti i Partners', 'textdomain' ),
- 'view_item' => __( 'Visualizza Partner', 'textdomain' ),
- 'search_items' => __( 'Cerca Partners', 'textdomain' ),
- 'not_found' => __( 'Non ci sono Partners ', 'textdomain' ),
- 'not_found_in_trash' => __( 'Non ci sono Partners nel cestino', 'textdomain' ),
- 'parent_item_colon' => '',
- 'menu_name' => 'Partners'
- );
- /**
- * Configurazione del CPT
- */
- $args = array(
- 'labels' => $labels,
- 'description' => __( 'Aggiungi descrizione Partner.', 'textdomain' ),
- 'public' => true,
- 'rewrite' => array(
- 'slug' => 'partner'
- ),
- 'has_archive' => true,
- 'hierarchial' => true,
- 'menu_position' => 5,
- 'supports' => array(
- 'title',
- )
- );
- /**
- * Registrazione del Custom Post Type
- */
- register_post_type( 'partner', $args );
- }
- add_action( 'init', 'register_partner_custom_post_type' );
Advertisement
Add Comment
Please, Sign In to add comment