• hi there.
    i made new custom post type.
    it work well, but i have a problem.
    i want get simple permalink but it is too long.
    example is “https://www.ithemes.co.kr/?shop=%e3%84%b7%e3%84%b7%e3%84%b7”
    i want get “https://www.ithemes.co.kr/?shop=post_id” or “https://www.ithemes.co.kr/?p=post_id”
    if i access “https://www.ithemes.co.kr/?p=53” like this, it work well too!
    but my problem is when i write post in admin panel, it is change permalink “https://www.ithemes.co.kr/?shop=%e3%84%b7%e3%84%b7%e3%84%b7” like this.
    even “rewrite” is false.

    register_post_type(
    			'shop',
    			array(
    				'labels' => array(
    				'name' => __('Shop Items'),
    				'singular_name' => __( 'Shop Item' ),
    				'add_new' => __( 'Add Shop Item' ),
    				'add_new_item' => __( 'Add New Shop Item' ),
    				'edit' => __( 'Edit Shop Item' ),
    				'edit_item' => __( 'Edit Shop Item' ),
    				'new_item' => __( 'New Shop Item' ),
    				'view' => __( 'View Shop Item' ),
    				'view_item' => __( 'View Shop Item' ),
    				'search_items' => __( 'Search Shop Items' ),
    				'not_found' => __( 'No Shop Items found' ),
    				'not_found_in_trash' => __( 'No Shop Items found in Trash' ),
    				'parent' => __( 'Parent Shop Item' ),
    			),
    			'singular_label' => __('shop'),
    			'public' => true,
    			'publicly_queryable' => false,
    			'show_ui' => true,
    			'menu_position' => 5,
    			'_builtin' => false,
    			'_edit_link' => 'post.php?post=%d',
    			'capability_type' => 'post',
    			'hierarchical' => false,
    			'rewrite' => false,
    			//'permalink_epmask' => 'EP_PERMALINK',
    			'query_var' => true,
    			'has_archive' => true,
    			'supports' => array('title','editor','thumbnail','excerpt','trackbacks','custom-fields','comments','revisions','page-attributes'),
    			'taxonomies' => array('post_tag')
    		));

    please help me, i can’t sleep!!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘set permalink in custom post type.’ is closed to new replies.