Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Register Custom Post Type
- function publication_post_type() {
- $labels = array(
- 'name' => _x( 'Veröffentlichungen', 'Post Type General Name', 'text_domain' ),
- 'singular_name' => _x( 'Veröffentlichung', 'Post Type Singular Name', 'text_domain' ),
- 'menu_name' => __( 'Veröffentlich.', 'text_domain' ),
- 'parent_item_colon' => __( 'Parent Product:', 'text_domain' ),
- 'all_items' => __( 'Alle Veröffentlichungen', 'text_domain' ),
- 'view_item' => __( 'Veröffentlichungen ansehen', 'text_domain' ),
- 'add_new_item' => __( 'Neue Veröffentlichung', 'text_domain' ),
- 'add_new' => __( 'Veröffentlichung hinzufügen', 'text_domain' ),
- 'edit_item' => __( 'Veröffentlichung bearbeiten', 'text_domain' ),
- 'update_item' => __( 'Veröffentlichung aktualisieren', 'text_domain' ),
- 'search_items' => __( 'Veröffentlichung suchen', 'text_domain' ),
- 'not_found' => __( 'keine Veröffentlichung gefunden', 'text_domain' ),
- 'not_found_in_trash' => __( 'keine Veröffentlichungen im Papierkorb gefunden', 'text_domain' ),
- );
- $rewrite = array(
- 'slug' => 'veroeffentlichungen',
- 'with_front' => false,
- 'pages' => true,
- 'feeds' => false,
- );
- $args = array(
- 'label' => __( 'publication', 'text_domain' ),
- 'description' => __( 'Veröffentlichungen', 'text_domain' ),
- 'labels' => $labels,
- 'supports' => array( 'title', ),
- 'taxonomies' => array( 'category', 'post_tag' ),
- 'hierarchical' => false,
- 'public' => true,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'show_in_nav_menus' => true,
- 'show_in_admin_bar' => true,
- 'menu_position' => 5,
- 'can_export' => true,
- 'has_archive' => true,
- 'exclude_from_search' => false,
- 'publicly_queryable' => true,
- 'capability_type' => 'post',
- );
- register_post_type( 'publication', $args );
- }
- // Hook into the 'init' action
- add_action( 'init', 'publication_post_type', 0 );
- codex example
- http://codex.wordpress.org/Function_Reference/register_post_type
Advertisement
Add Comment
Please, Sign In to add comment