Problem

Post pages of a WordPress custom post type show a 404 error.

Solution

To solve this issue I simply needed to flush (refresh) WordPress permalinks:

  1. In the WordPress admin panel, go to “Settings” » “Permalinks”.
  2. Click the “Save Changes” button.