add rewrite rules for custom post types
-
Hi,
I registered a new custom post type :// REGISTER CUSTOM POST TYPE
register_post_type(‘classified’, array(
‘label’ => ‘Classifieds’,
‘singular_label’ => ‘Classified’,
‘public’ => true,
‘show_ui’ => true, // UI in admin panel‘capability_type’ => ‘post’
));So when the permalinks are enabled;
/wp/classified/the-post-slug/
brings me to the single post.But I would like
/wp/classified/to bring me on the classifieds index loop;
exactly like when I use
/wp/?post_type=classified.Actually it returns a 404 error.
I did try to add new rewrite rules but I don’t get it.
Could anyone help ?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘add rewrite rules for custom post types’ is closed to new replies.