Skip to content

Instantly share code, notes, and snippets.

@rodica-andronache
Created May 5, 2014 15:17
Show Gist options
  • Select an option

  • Save rodica-andronache/b4c46fc9d292107d9aee to your computer and use it in GitHub Desktop.

Select an option

Save rodica-andronache/b4c46fc9d292107d9aee to your computer and use it in GitHub Desktop.
Posts and custom post types in same category
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