WordPress.org

Ready to get started?Download WordPress

Forums

Problem in custom rewrite rules (1 post)

  1. Nitesh
    Member
    Posted 8 months ago #

    i have register a custom post type listing with this simple code.

    function create_new_custom_post_type() {

    register_post_type( 'POST_TYPE',
    array(
    'labels' => array(
    'name' => __( 'listing' ),
    'singular_name' => __( 'listing' )
    ),
    'public' => true,
    'has_archive' => true,
    'rewrite' => FALSE,
    )
    );
    }

    add_action( 'init', 'create_new_custom_post_type' );

    i have some costume field for this post type like location, property type. i just want to add this costume field in the url structure. i just want to create url like this :
    http://www.mydomain.com/location/property_type/propertyid

    How can i rewrite the url like that. ? location and property_type is varying according to the post.

Reply

You must log in to post.

About this Topic