Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#41626 closed enhancement (duplicate)

Template Hierarchy: Custom 404 pages for CPTs

Reported by: ramiy Owned by:
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords:
Cc: Focuses: template

Description

Currently theme developers can customize only one error page they can design - using the 404.php file. We can't create custom 404 pages based on CPT's. Let's change that!

WordPress template hierarchy supports CPT's with single CPT pages single-{post-type}.php, archive CPT pages archive-{post-type}.php and embed pages embed-{post-type}.php. It's missing the option to create custom 404 pages for CPTs in a form of 404-{post-type}.php.

Let's extend the 404 pages with a new template file path:

  • 404-{post-type}.php
  • 404.php
  • index.php

Change History (1)

#1 @johnbillion
9 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Thanks for the suggestion. This is already being worked on in #23049.

Note: See TracTickets for help on using tickets.