Last active
January 2, 2016 07:39
-
-
Save bizzthemes/8271738 to your computer and use it in GitHub Desktop.
How to add layout settings to custom post type.
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
<?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