﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
20234,'exclude_from_search' parameter for custom posts makes taxonomy archive pages return 0 posts,egorpromo,,"I have custom posts 'manuals' and taxonomy 'manuals-category' for it.
{{{
add_action( 'init', 'create_manual_post_type' );
function create_manual_post_type()
{
	register_post_type('manual', 
		array(	
			'label' => 'Manuals',
			'public' => TRUE,
			'rewrite' => array( 'slug' => 'manuals', 'with_front' => true),
			'has_archive' => true,
			'public' => true,
			'exclude_from_search' => TRUE, //This is for exclude my manuals when I make search for word 'wordpress' like ""http://myblog.com/?s=wordpress&submit=submit""
		) 
	);

	register_taxonomy(
'manuals-category',
'manual',
		array(
			'hierarchical'=>false,
			'label'=>'Manual Category',
			'rewrite' => array( 'slug' => 'manuals-category', 'with_front' => true)
			)
);

	flush_rewrite_rules(false);

}
}}}
I want use 'exclude_from_search' parameter to prevent custom posts are visible when somebody searches keywords in my blog.
If I state 'exclude_from_search'=>TRUE my custom posts disappear on pages like  http://myblog.com/manuals-category/{slug}.
{slug} is a term of 'manuals-category' taxonomy. Archive page opens but there are no posts in the Loop. When I state 'exclude_from_search'=>FALSE all is correct.

I suppose it is not documented behavior [http://codex.wordpress.org/Function_Reference/register_post_type] and bug.",defect (bug),closed,normal,,Post Types,3.3.1,normal,duplicate,,
