Created
May 5, 2014 15:17
-
-
Save rodica-andronache/b4c46fc9d292107d9aee to your computer and use it in GitHub Desktop.
Posts and custom post types in same category
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
| La register_post_type trebuie adaugat : | |
| 'taxonomies' => array('category') | |
| Ex: | |
| add_action( 'init', 'trustedtherapist_create_post_type' ); | |
| function trustedtherapist_create_post_type() { | |
| register_post_type( 'case', | |
| array( | |
| 'labels' => array( | |
| 'name' => __( 'Cases' ), | |
| 'singular_name' => __( 'Cases' ) | |
| ), | |
| 'public' => true, | |
| 'has_archive' => true, | |
| //for tags | |
| 'taxonomies' => array('category'), | |
| //for the featured image | |
| 'supports' => array( 'title', 'editor', 'thumbnail', 'revisions' ), | |
| 'show_ui' => true, | |
| ) | |
| ); | |
| flush_rewrite_rules(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment