Last active
October 24, 2018 08:29
-
-
Save mkwebworker/6824734 to your computer and use it in GitHub Desktop.
Register CPT #wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register CPT Gesellschaften ++++++++++++++++++++++++++++++++++++++++++++++++ | |
*/ | |
function gesellschaft_init() { | |
$labels = array( | |
'name' => 'Gesellschaften', | |
'singular_name' => 'Gesellschaft', | |
'add_new' => 'Hinzufügen', | |
'add_new_item' => 'Gesellschaft hinzufügen', | |
'edit_item' => 'Gesellschaft bearbeiten', | |
'new_item' => 'Neue Gesellschaft', | |
'all_items' => 'Alle Gesellschaften', | |
'view_item' => 'Gesellschaft ansehen', | |
'search_items' => 'Gesellschaft suchen', | |
'not_found' => 'Keine Gesellschaften gefunden', | |
'not_found_in_trash' => 'Keine Gesellschaften im Papierkorb', | |
'parent_item_colon' => '', | |
'menu_name' => 'Gesellschaften' | |
); | |
$args = array( | |
'labels' => $labels, | |
'public' => true, | |
'publicly_queryable' => true, | |
'show_ui' => true, | |
'show_in_menu' => true, | |
'query_var' => true, | |
'rewrite' => array( 'slug' => 'gesellschaft' ), | |
'capability_type' => 'post', | |
'has_archive' => true, | |
'hierarchical' => false, | |
'menu_position' => null, | |
'supports' => array( 'title','customfields' ) | |
); | |
register_post_type( 'gesellschaft', $args ); | |
} | |
add_action( 'init', 'gesellschaft_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment