Custom post type as an archive
-
Hi !
I have created a custom post type named “news”, it’s workling properly, I can see the posts under the https://example.com/news/post-title. Now I’d like to be able to list all the posts of the type “news”.
I added this rewrite rule :
'news/?$' => 'index.php?post_type=news'
but when I go to https://example.com/news/, I see the exact same page as https://example.com, showing posts of the other type as well (I have one other custom type).What did I do wrong ?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom post type as an archive’ is closed to new replies.