0

I have a vanilla install of WP

Using Custom post type UI plugin I have added a CPT called 'news'. Created some 'news' items and then looked in:

http://mysite.local/news/

Expecting to see an archive of all 'news' posts

Get a 404.

I can view an item fine: http://mysite.local/news/myitem

I have tried playing with various options for CPT but to no avail. One post said I needed to create a custom archive, but I'm pretty sure if none is specified then it will default to archive.php.

  • Did you set has_archive to true for your custom post type? Show us the code that registers the post type. – Milo Jul 1 '15 at 16:09
  • Using a plugin - will try and find code, but did try the archive to true and nada. – Pete Norris Jul 1 '15 at 16:09
  • Settings are all in DB so can't see them. – Pete Norris Jul 1 '15 at 16:15
  • 2
    You have to flush rewrite rules after making changes, not sure if that plugin does that for you. Honestly, post type registration is pretty trivial, code-wise, I suggest ditching the plugin and just doing it manually. – Milo Jul 1 '15 at 16:16
  • I did a clean install of WP and the problem has been resolved. Although I do have another issue which I will raise another question for in a mo - related so appreciate if you could take a look. thanks Milo. – Pete Norris Jul 2 '15 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.