Skip to content

Instantly share code, notes, and snippets.

@dmje
Created April 4, 2016 09:43
Show Gist options
  • Save dmje/b0d888280469f9bf776f2f70079a3523 to your computer and use it in GitHub Desktop.
Save dmje/b0d888280469f9bf776f2f70079a3523 to your computer and use it in GitHub Desktop.
<?php
add_action( 'init', 'create_my_post_types' );
function create_my_post_types() {
register_post_type('exhibition', array(
'labels' => array(
'name' => __( 'Exhibitions' ),
'singular_name' => __( 'Exhibition' ),
'add_new' => __( 'Add New' ),
'add_new_item' => __( 'Add New Exhibition' ),
'edit' => __( 'Edit' ),
'edit_item' => __( 'Edit Exhibition' ),
'new_item' => __( 'New Exhibition' ),
'view' => __( 'View Exhibition' ),
'view_item' => __( 'View Exhibition' ),
'search_items' => __( 'Search Exhibitions' ),
'not_found' => __( 'No Exhibitions found' ),
'not_found_in_trash' => __( 'No Exhibitions found in Trash' ),
),
'public' => true,
'show_ui' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'menu_position' => 20,
'menu_icon' => 'dashicons-star-filled',
'query_var' => true,
'rewrite' => array( 'slug' => 'exhibitions', 'with_front' => false ),
'supports' => array( 'title', 'editor', 'thumbnail' ),
'has_archive' => 'exhibitions'
) );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment