Last active
February 20, 2019 13:49
-
-
Save musaghauri/641e57615dd5e726c5a1eb8d821bff23 to your computer and use it in GitHub Desktop.
Portfolio Custom Post Type
This file contains hidden or 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 | |
| // Creates Portfolio Custom Post Type | |
| function portfolio_init() { | |
| $args = array( | |
| 'label' => 'Portfolios', | |
| 'public' => true, | |
| 'show_ui' => true, | |
| 'capability_type' => 'post', | |
| 'hierarchical' => false, | |
| 'rewrite' => array('slug' => 'portfolios'), | |
| 'query_var' => true, | |
| 'menu_icon' => 'fa-briefcase', | |
| 'supports' => array( | |
| 'title', | |
| 'editor', | |
| 'excerpt', | |
| 'trackbacks', | |
| 'custom-fields', | |
| 'comments', | |
| 'revisions', | |
| 'thumbnail', | |
| 'author', | |
| 'page-attributes', | |
| ) | |
| ); | |
| register_post_type('portfolios', $args); | |
| } | |
| add_action('init', 'portfolio_init'); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment