Skip to content

Instantly share code, notes, and snippets.

@bizzthemes
Last active January 2, 2016 07:39
Show Gist options
  • Save bizzthemes/8271738 to your computer and use it in GitHub Desktop.
Save bizzthemes/8271738 to your computer and use it in GitHub Desktop.
How to add layout settings to custom post type.
<?php
//* Do NOT include the opening php tag, only copy the code below
//* Register custom post type example
add_action( 'init', 'portfolio_post_type' );
function portfolio_post_type() {
register_post_type( 'portfolio', array(
'labels' => array(
'name' => __( 'Portfolio', 'bizznis-child' ),
'singular_name' => __( 'Portfolio', 'bizznis-child' ),
),
'has_archive' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'rewrite' => array( 'slug' => 'portfolio' ),
'supports' => array( 'title', 'editor', 'bizznis-layouts' ),
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment