Skip to Content
Balinot ThemeTemplate structure

Template Structure

Main template layer:

  • wp-content/themes/balinot/header.php
  • wp-content/themes/balinot/footer.php
  • wp-content/themes/balinot/page.php
  • wp-content/themes/balinot/home.php
  • wp-content/themes/balinot/single-post.php
  • wp-content/themes/balinot/page-inicio.php

Declared page templates:

  • wp-content/themes/balinot/templates/page-home.php
  • wp-content/themes/balinot/templates/page-aviso-legal.php
  • wp-content/themes/balinot/templates/page-politica-privacidad.php
  • wp-content/themes/balinot/templates/page-politica-cookies.php
  • wp-content/themes/balinot/templates/page-politicas.php

Template folders:

  • templates/partials/: section-level partials and shared layout blocks.
  • templates/components/: reusable UI components selected by routers or shared by multiple templates.
  • templates/emails/: theme-level email overrides.

Current partial folders:

  • templates/partials/general/: shared sections reused by many templates.
  • templates/partials/home/: home page sections.
  • templates/partials/textos-legales/: legal page sections.
  • templates/partials/error-404/: 404 layout variants.
  • templates/partials/about-10445/: page-specific partial set for the about page.
  • templates/partials/faq-10635/: page-specific partial set for the FAQ page.
  • templates/partials/taxonomy-product_cat/: taxonomy-specific partials.
  • templates/partials/contact-247/: contact-related shared block.

Shared root partials:

  • templates/partials/header.php
  • templates/partials/footer.php
  • templates/partials/breadcrumbs.php
  • templates/partials/menu-primary.php
  • templates/partials/menu-mobile.php
  • templates/partials/menu-footer.php
  • templates/partials/menu-categorias.php
  • templates/partials/menu-legal.php
  • templates/partials/menu-interes.php

General shared partials:

  • templates/partials/general/faqs.php
  • templates/partials/general/reviews.php
  • templates/partials/general/help.php
  • templates/partials/general/calidad.php

Important rule for general partials:

  • templates/partials/general/faqs.php and templates/partials/general/reviews.php are public routers.
  • Do not call templates/components/faqs-.php or templates/components/reviews-.php directly from page templates.
  • Call the general router partials and let them resolve data and component selection.

Components folder:

  • templates/components/faqs-1.php
  • templates/components/faqs-2.php
  • templates/components/reviews-1.php
  • templates/components/reviews-2.php
  • templates/components/reviews-3.php
  • templates/components/product-card.php

What belongs in components:

  • Reusable presentational markup.
  • Low-level UI blocks reused by routers, templates, or shortcodes.
  • Markup that should not own page-specific ACF lookups or context decisions.

What belongs in partials:

  • Page or section logic.
  • Data preparation close to the section.
  • get_field() calls or context detection when that section owns the data.

When to create a new general partial:

  • Put it in templates/partials/general/ when the section is shared across different page templates.
  • Typical examples are FAQ, reviews, help, or any common CTA strip used in more than one page.

When to create a new page folder:

  • Create templates/partials/about/ when you are building a reusable page template family.
  • Create templates/partials/about-10445/ only when the section set is intentionally locked to one real page and one content model.

When to create a new component:

  • Put it in templates/components/ when it is a presentational block that may be reused by different pages, routers, or shortcodes.
  • Example categories: cards, accordions, sliders, quote blocks, media blocks, stat blocks.

Good naming rules:

  • Page template file: page-about.php
  • Page partial folder: partials/about/
  • Shared section partial: partials/general/testimonials.php
  • Router component family: components/reviews-1.php, components/reviews-2.php
  • Shared UI component: components/stat-card.php

Practical decision rule:

  • If the file decides what data to read, it should usually be a partial.
  • If the file only receives args and prints markup, it should usually be a component.

How page templates are usually assembled:

  1. The main template opens header and wrapper markup.
  2. It defines an ordered list of sections or loads a fixed set of partials.
  3. Each section is rendered from templates/partials/{group}/…
  4. Shared blocks such as FAQs and reviews are appended through templates/partials/general/.
  5. The template closes with get_footer().

Examples:

  • templates/page-home.php orchestrates an ordered sections array and delegates to templates/partials/home/ and templates/partials/general/.
  • templates/page-politicas.php delegates legal content to templates/partials/textos-legales/ and appends shared FAQs and reviews.
  • page.php is the minimal fallback and appends generic FAQs and reviews after the main content.

Page-specific folder naming:

  • Some pages use folders named after a stable page identifier, like about-10445 or faq-10635.
  • Keep that pattern when a page has many custom sections that are not meant to be shared globally.

Email templates:

  • Theme overrides live in templates/emails/.
  • The email setup module falls back to its own templates when no theme override exists.

WooCommerce note:

  • There is also a separate WooCommerce template layer in wp-content/themes/balinot/woocommerce/.
  • Setup modules can also ship templates inside their own folders, but those are module-owned templates, not the main theme templates/ tree.
Last updated on