Architecture Foundation
Zalbi Theme is built on the Underscores (_s) framework, which provides:- Clean, semantic HTML5 markup
- Mobile-first responsive design
- Accessibility-ready structure
- Translation-ready codebase
- Modular component architecture
The theme is specifically designed for bilingual support (Spanish/Euskera) using Polylang, with custom implementations throughout the codebase.
Directory Structure
The theme follows a standard WordPress theme structure with custom additions:Core Components
1. Theme Configuration
functions.php (236 lines)
functions.php (236 lines)
The main configuration file that handles:
- Theme Setup: Text domain, feed links, title tag, post thumbnails
- Navigation Menus: Primary menu and legal footer menu
- Custom Post Types:
hinchable(Inflatables) - slug:catalogoevento(Events) - slug:eventos
- Custom Taxonomies:
tipo_hinchablefor categorizing inflatables - Widget Areas: Sidebar registration
- Asset Enqueuing: Styles and scripts (Font Awesome, Google Fonts)
- WhatsApp Integration: Customizer settings for floating WhatsApp button
functions.php:12. Include Files (inc/)
Modular functionality is organized in the inc/ directory:
template-tags.php
Custom template tags for displaying post metadata:
zalbi_posted_on()- Post date displayzalbi_posted_by()- Author informationzalbi_entry_footer()- Post footer metadata
template-functions.php
Helper functions that enhance theme functionality:
- Body class modifications
- Pingback header additions
customizer.php
WordPress Customizer integration for theme options and live preview
custom-header.php
Custom header image implementation and configuration
jetpack.php
Jetpack plugin compatibility layer (loaded conditionally)
3. Template Parts (template-parts/)
Reusable content templates for different contexts:
content.php- Default post content displaycontent-page.php- Page content layoutcontent-search.php- Search results formattingcontent-none.php- No results found message
4. JavaScript (js/)
Client-side functionality:
navigation.js- Mobile menu toggle and keyboard navigationcustomizer.js- Live preview updates in the Customizer
5. Assets
- Images (
img/): Theme logo (logo.webp) - Translations (
languages/): POT file for internationalization
Custom Post Types
Zalbi Theme implements two custom post types specifically designed for the rental business:
Hinchables (Inflatables)
- Custom fields via ACF (Advanced Custom Fields)
- Custom taxonomy:
tipo_hinchable(inflatable types) - Dedicated template:
single-hinchable.php - Archive page:
page-catalogo.php
functions.php:138
Eventos (Events)
- Event-specific content structure
- Dedicated template:
single-evento.php - Archive page:
page-eventos.php
functions.php:171
Bilingual Support
The theme is designed to work with Polylang for Spanish/Euskera translations:- Translation domain:
zalbi - POT file:
languages/zalbi.pot - Text domain loaded in:
functions.php:22 - Language detection throughout templates using
pll_current_language()
External Dependencies
Font Awesome 6.4.0
Icon library loaded via CDN for UI elements
Google Fonts
- Nunito: 400, 700, 900 weights
- Open Sans: 400, 600 weights
Advanced Custom Fields (ACF)
Used for custom fields in Hinchables:
- Measurements (
medidas) - Capacity (
capacidad) - Color tags (
etiqueta_color)
Polylang
Multilingual support for Spanish and Euskera (Basque)
Theme Metadata
Defined instyle.css header:
- Theme Name: zalbi-theme
- Version: 1.0.0
- Author: Yeray Garrido
- Text Domain: zalbi
- Requires PHP: 5.6
- Tested up to: WordPress 5.4
- License: GPL v2 or later
Design Philosophy
- Mobile-First: Responsive design with mobile navigation
- Accessibility: Semantic HTML5 and ARIA support
- Modularity: Separation of concerns with include files
- Customization: WordPress Customizer integration
- Performance: Minimal dependencies, optimized asset loading
- SEO-Friendly: Clean URLs, proper heading hierarchy
Next Steps
Template Hierarchy
Learn how WordPress selects templates in Zalbi Theme
File Organization
Detailed breakdown of every file and directory