WordPress.org

Ready to get started?Download WordPress

Forums

Custom Type Post and ReWrite mode (1 post)

  1. Glance World
    Member
    Posted 3 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic