Custom content types are not visible due to missing rewrite flush or capabilities.
Custom Post Types Not Displaying
Key Points: Registered post types don’t appear in the admin or show 404 on the front-end.
You register a new post type — maybe “Portfolio” or “Books” — but it’s like WordPress never heard of it. Either it’s missing from the admin menu or clicking the archive gives you a 404.
🔍 Why It Happens
- Rewrite rules not flushed after registration
publicorhas_archiveflags not set- Missing capability mapping or UI options
🛠️ Fix Checklist
- After registering post type, run:
flush_rewrite_rules();Or simply visit Settings → Permalinks → click “Save”
- Ensure
show_ui,public, andhas_archiveare set totrue - Test access permissions with a user that should see them
📘 Bonus
Registering post types on init hook is a must. And if using ACF or CPT UI plugin — always double-check saved settings after theme switch.