Custom Post Types Not Displaying – WordPress Daily Routine Custom Post Types Not Displaying


Categories

Custom Post Types Not Displaying

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
  • public or has_archive flags not set
  • Missing capability mapping or UI options

🛠️ Fix Checklist

  1. After registering post type, run:
    flush_rewrite_rules();

    Or simply visit Settings → Permalinks → click “Save”

  2. Ensure show_ui, public, and has_archive are set to true
  3. 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.