Make WordPress Core

Opened 19 months ago

Last modified 4 weeks ago

#23049 new enhancement

Template hierarchy for 404

Reported by: mark-k Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: template Cc:


load 404-{post-type}.php when url structure matches post permalink structure but there is no post at that address.

load 404-{taxonomy}.php when url structure matches taxonomy permalink structure but doesn't match any specific taxonomy tag URL.

And so on....

The idea is to have different 404 pages based on the context to which the URL refers. For example if a site has a blog and a shop it might be better to show a blog specific 404 page when the URL might be interpreted as a post and a shop specific 404 page when the URL might be interpreted as a product.

Change History (3)

comment:1 SergeyBiryukov19 months ago

  • Component changed from Themes to Template

comment:2 nacin5 months ago

  • Component changed from Template to Themes
  • Focuses template added

comment:3 SergeyBiryukov4 weeks ago

  • Summary changed from Template hirarchy for 404 to Template hierarchy for 404
Note: See TracTickets for help on using tickets.