Skip to content

Add missing route templates: 404, search, single, page #5

Open

Description

@eleshar

Scope

templates/ contains only index.html. Single posts, pages, search results and 404s all fall through to the generic query loop or WP's fallback chain, so every theme scaffolded from this template needs the same manual catch-up before launch.

Add the missing templates as minimal, correct stubs:

  • templates/404.html
  • templates/search.html
  • templates/single.html
  • templates/page.html

Requirements:

  • Use core blocks only; no custom CSS or JS.
  • Reuse the existing parts/header.html and parts/footer.html.
  • single.html and page.html centre on wp:post-content; search.html uses a bounded query loop with a no-results branch; 404.html includes a search block.
  • Register with correct templateTypes where theme.json declares them, and add the required title/description headers.
  • Do not add image blocks without explicit dimensions — templates in this repo are copied verbatim into client projects and become the CLS baseline.

Acceptance criteria

  • A single post, a static page, a search results page and a 404 each render through their own template, confirmed against a scaffolded install.
  • Search with no matches renders a no-results state, not an empty page.
  • All four templates validate against the Validate Theme CI job.
  • No custom stylesheet or script is introduced; the theme still ships zero render-blocking CSS.
  • Every query loop is bounded — no perPage removal or unbounded inherit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions