Developer Guide
Template Hierarchy

Template Hierarchy

As a Full Site Editing block theme, AlonePro uses HTML block templates (templates/*.html) and template parts (parts/*.html) rather than legacy PHP template files (page.php, single.php, header.php).


Template Resolution Flow in Child Themes

When WordPress renders an FSE page:

  1. WordPress checks the active child theme (alonepro/templates/ or alonepro/parts/).
  2. If found, the child theme file is loaded.
  3. If not found in the child theme, WordPress falls back to the parent theme (nextora/templates/ or nextora/parts/).
  4. Any user customizations saved via the Site Editor in the WordPress database (wp_template custom post type) take precedence over both filesystem files.

AlonePro Templates (templates/*.html)

AlonePro ships with 15 production-ready block templates:

Template FileTemplate TitleUsage / Hierarchy Role
front-page.htmlFront PageDedicated static homepage template.
home.htmlBlog HomeLatest blog posts index.
index.htmlFallback IndexUniversal fallback template for all unassigned queries.
page.htmlPageStandard default page layout.
page-container.htmlPage — ContainerCentered container page with padded layout bounds.
page-full-width.htmlPage — Full WidthEdge-to-edge layout without side constraints.
about-us.htmlAbout UsSpecialized organizational profile template.
contact-us.htmlContact UsLocation, office hours, and contact form layout.
frequently-asked-questions.htmlFAQQuestion-and-answer accordion section layout.
theme-terms-conditions.htmlTerms & ConditionsLegal terms document structure.
theme-privacy-policy.htmlPrivacy PolicyDonor and visitor privacy compliance layout.
single.htmlSingle PostIndividual blog post layout with comments and metadata.
archive.htmlArchiveCategory, tag, author, and date archive listings.
search.htmlSearch ResultsQuery results layout with search summary header.
404.html404 ErrorNot-found page with helpful navigation and search form.

Template Parts (parts/*.html)

Template parts are reusable layout blocks. AlonePro provides:

  • header-v2.html: Split navigation header with logo, navigation links, and prominent "Donate Now" CTA button.
  • footer-4-columns.html: Comprehensive 4-column charity footer with mission bio, fast links, campaign links, and legal copy.
  • footer-4-columns-newsletter.html: 4-column footer featuring an integrated email newsletter subscription form.

Overriding Parent Template Parts

To override any template part from Nextora, simply create a file with the identical name in wp-content/themes/alonepro/parts/<name>.html. WordPress will automatically load your child version.


Registering Custom Templates in theme.json

AlonePro registers custom page templates in theme.json under customTemplates:

{
  "customTemplates": [
    {
      "name": "page-container",
      "title": "Page — Container",
      "postTypes": [ "page" ]
    }
  ]
}

Once registered, the template appears in the Template dropdown within the WordPress Page attributes panel.