I'm working with custom post types, I've developed a plugin with no problems. the problem is when I try to set a empty slug. The permalink is created correctly but I always get 404 error with this URL.
http://www.domain.com/test/post-name/ this works fine.
http://www.domain.com/post-name/ this get 404 , but this is that I want.
I'm wondering if it is possible to obtain this config, without touching the core of WP and make it forward compatible
Thanks!
function create_post_type() {
register_post_type( 'test',
array(
'labels' => array(
'name' => __( 'test' ),
'singular_name' => __( 'tests' )
),
'public' => true,
'rewrite' => array(
'slug' => '',
'with_front' => true)
)
);
}