Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active December 17, 2018 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/6ed76fc4eab7ef0a42180688fda4c217 to your computer and use it in GitHub Desktop.
Save billerickson/6ed76fc4eab7ef0a42180688fda4c217 to your computer and use it in GitHub Desktop.
<?php
$args = array(
'labels' => $labels,
'hierarchical' => false,
'supports' => array( 'title', 'editor', 'genesis-cpt-archives-settings' ),
'public' => true,
'show_ui' => true,
'show_in_rest' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'publicly_queryable' => true,
'exclude_from_search' => false,
'has_archive' => true,
'query_var' => true,
'can_export' => true,
'rewrite' => true,
'taxonomies' => array( 'category' ),
'menu_icon' => 'dashicons-media-code',
);
register_post_type( 'code', $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment