﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
21417,Custom Post Type Permalink Returns 404 Error,imageac,,"Since, I upgraded Wordpress version from 3.3.2 to 3.4.1, I discovered permalink returns 404 error on (1) Paged categories, and (2) Custom type posts.

The paged categories has been fixed implementing ticket:21209, but custom type posts return 404 error when it called.

I am using following code to register custom type post 'products'.


{{{
function products_register() {

 

	$labels = array(
		'name' => _x('Products', 'post type general name'),
		'singular_name' => _x('Product', 'post type singular name'),
		'add_new' => _x('Add New', 'product item'),
		'add_new_item' => __('Add New Product'),
		'edit_item' => __('Edit Product'),
		'new_item' => __('New Product'),
		'view_item' => __('View Product'),
		'search_items' => __('Search Product'),
		'not_found' =>  __('Nothing found'),
		'not_found_in_trash' => __('Nothing found in Trash'),
		'parent_item_colon' => ''
	);

 

	$args = array(
		'labels' => $labels,
		'public' => true,
		'publicly_queryable' => true,
		'show_ui' => true,
		'query_var' => true,
// working perfect in 3.3.2		'rewrite' => true,
// also tried this in 3.4.1		'rewrite' => array('slug' => 'products','with_front' => FALSE),
		'rewrite' => array('slug' => 'products'),
		'capability_type' => 'post',
		'hierarchical' => false,
		'can_export' => true,
		'menu_position' => 5,
		 'taxonomies' => array('category'), 
		'supports' => array('title','editor','thumbnail', 'custom-fields')
	  ); 

 

	register_post_type( 'products' , $args );

}



//Registering Post-Type Products for Affiliate products only

add_action('init', 'products_register');





function add_default_boxes() {

    register_taxonomy_for_object_type('category', 'products');

}

//Registering Taxonomy for Products post-type

add_action('init', 'add_default_boxes');


}}}",defect (bug),new,normal,Awaiting Review,Permalinks,3.4.1,minor,,reporter-feedback,
