Skip to content

Instantly share code, notes, and snippets.

@justyntemme
Created October 20, 2017 21:11
Show Gist options
  • Save justyntemme/9830ca3146fb9b8eb5522c24911d1289 to your computer and use it in GitHub Desktop.
Save justyntemme/9830ca3146fb9b8eb5522c24911d1289 to your computer and use it in GitHub Desktop.
function communities_init() {
$args = [
'label' => 'communities',
'public' => true,
'show_ui' => true,
'capability_type' => true,
'hierarchical' => false,
'rewrite' => ['slug' => 'communities'],
'query_var' => true,
'menu_icon' => 'dashicons-video-alt',
'supports' => [
'name',
'Description',
'url',
'image'],
];
register_post_type( 'communities', $args );
}
add_action( 'init', 'communities_init');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment