Support » Plugins » Custom Type Post and ReWrite mode

  • I am registering the custom type module for my projects.

    Here is my code

    register_post_type( 'projects', array(
    'label' => __('Projects'),
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'hierarchical' => false,
    'rewrite' => false,
    'query_var' => false,
    'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments'),
    ) );

    register_taxonomy( 'projects', 'projects', array(
    'hierarchical' => true,
    'label' => __('Categories'), // The Label to show in WordPress backend
    'query_var' => 'projects',
    'rewrite' => array('slug' => 'projects' ) // Slug to use in URLs
    ) );

    Now i want to add a rewrite mode like /projects/%project texonomy%/projectpage.html. Can anybody tell me how to code it?

  • The topic ‘Custom Type Post and ReWrite mode’ is closed to new replies.