Skip to Content
Balinot ThemePage templates

Page Templates

Base wrappers:

  • header.php loads templates/partials/header.
  • footer.php loads templates/partials/footer.
  • page.php is the basic fallback template for regular pages.

Where page templates live:

  • wp-content/themes/balinot/templates/page-*.php

Current custom page templates:

  • templates/page-home.php
  • templates/page-aviso-legal.php
  • templates/page-politica-privacidad.php
  • templates/page-politica-cookies.php
  • templates/page-politicas.php

Common template pattern:

  1. Call get_header().
  2. Open a main wrapper.
  3. Load sections with get_template_part().
  4. Optionally read ACF fields per section.
  5. Append global FAQs or reviews if the template needs them.
  6. Call get_footer().

Home example:

  • templates/page-home.php defines an ordered sections array.
  • Most sections are rendered from templates/partials/home/{slug}.php.
  • FAQs, reviews, and help are handled explicitly because they have extra logic.

Legal pages example:

  • templates/page-aviso-legal.php and the other legal templates load a hero partial first.
  • Then they load a specific content partial from templates/partials/textos-legales/.
  • Then they append the generic FAQ and review blocks.

Recommended structure for a new page template:

  1. Create templates/page-my-page.php with a Template Name header.
  2. Keep the wrapper thin.
  3. Move real section markup into templates/partials/my-page/.
  4. Read ACF or settings data inside each section partial when the section owns that data.

Recommended naming for a reusable page template:

  • Template file: templates/page-about.php
  • Partial folder: templates/partials/about/
  • Section partials: hero.php, intro.php, values.php, team.php, faq-cta.php

Recommended naming for a one-off page tied to one page record:

  • Partial folder: templates/partials/about-10445/
  • Use this only when the partial set is intentionally bound to a single page and not meant to become a reusable template family.

Template recipe for a new “About us” page:

  1. Create templates/page-about.php.
  2. Define an ordered sections array.
  3. For each section, load templates/partials/about/{section}.php.
  4. Keep FAQs, reviews, and other global blocks in templates/partials/general/ when they are shared across pages.
  5. If the page needs dedicated CSS or JS, register an about rule in modules/00-enqueue.php.

Minimal example:

<?php /* Template Name: About */ defined('ABSPATH') || exit; get_header(); $sections = ['hero', 'story', 'values', 'team']; ?> <div class="w-full max-w-full"> <main class="w-full overflow-hidden"> <?php foreach ($sections as $section) : ?> <?php get_template_part("templates/partials/about/`{$section}`"); ?> <?php endforeach; ?> <?php get_template_part('templates/partials/general/faqs'); ?> <?php get_template_part('templates/partials/general/reviews'); ?> </main> </div> <?php get_footer(); ?>

Good rule:

  • Page templates should orchestrate sections.
  • Partials should own the actual section markup.
Last updated on