• Chris Feix

    (@chrisfeix)


    So I’ve registered a custom post type of “Presentations” code below…

    add_action( ‘init’, ‘create_presentation_type’ );
    function create_presentation_type() {
    register_post_type( ‘presentation_page’,
    array(
    ‘labels’ => array(
    ‘name’ => __( ‘Presentations’ ),
    ‘singular_name’ => __( ‘Presentation’ )
    ),
    ‘public’ => true,
    ‘query_var’ => true,
    ‘hierarchical’ => true,
    ‘rewrite’ => true,
    ‘menu_position’ => 21,
    ‘supports’ => array(‘title’, ‘revisions’),
    ‘taxonomies’ => array(‘category’),
    )
    );

    I don’t want a custom taxonomy or custom category for this post type. I want the post to show up with the following permalink structure:

    /%category%/%postname%

    Just like it was a normal post. I’ve tried every type of slug rewrite etc… get bored with flushing my rewrite rules with my fingers crossed, only to be let down. Any help would be appreciated.

  • The topic ‘Using Custom Post Type Category for Slug’ is closed to new replies.