Registration
The eventos post type is registered infunctions.php using the zalbi_register_eventos() function:
functions.php (lines 170-183)
Configuration Parameters
Display labels for the post type in the WordPress admin
- name: “Eventos” (plural)
- singular_name: “Evento” (singular)
Makes the post type publicly accessible on the frontend and in the admin
Disables the archive page. Events are displayed via custom templates or page layouts
The calendar Dashicon displayed in the WordPress admin menu
Features supported by the post type:
title- Event name/titleeditor- Visual editor for full descriptionthumbnail- Featured image supportexcerpt- Short summary for listings
URL slug for individual events. URLs will be structured as
/eventos/event-name/Use Cases
The eventos post type can be used for:- Event Packages: Pre-configured party packages (e.g., “Cumpleaños Premium”, “Comunión Completa”)
- Portfolio: Showcase completed events with photos and descriptions
- Seasonal Events: Special holiday or seasonal offerings
- Service Descriptions: Detailed event planning services
Creating an Event
Add Event Details
- Title: Name of the event or package (e.g., “Cumpleaños Infantil Premium”)
- Content: Complete description including:
- What’s included in the package
- Duration and pricing information
- Target age group or event type
- Setup and teardown details
- Excerpt: Brief summary for event listings
Set Featured Image
Upload an eye-catching image that represents the event:
- Event setup photos
- Happy customers/kids enjoying the event
- Complete event package visualization
URL Structure
The
eventos slug is generic to support multilingual SEO with Polylang./eventos/cumpleanos-premium//eventos/comunion-completa//eventos/fiesta-piscina/
Simplified Design
As noted in the code comments, the eventos implementation is intentionally simple (“codigo mas sencillo da que englobamos todos los eventos juntos”):- No taxonomies: All events are grouped together without categorization
- No custom fields: Uses standard WordPress fields only
- Flexible content: The editor allows complete freedom in structuring event information
If you need to categorize events (e.g., by event type, season, or age group), you can add a custom taxonomy similar to
tipo_hinchable. See Taxonomies for examples.Template Hierarchy
WordPress will look for templates in this order:single-evento.php- Specific template for eventssingle.php- Generic single post templatesingular.php- Fallback singular templateindex.php- Ultimate fallback
Querying Eventos
Get All Events
Recent Events
Display Event Card
Admin Menu Location
The Eventos post type appears in the WordPress admin sidebar with:- Icon: Calendar (dashicons-calendar-alt)
- Position: Below Hinchables
- Submenu items:
- All Eventos
- Add New
Integration with Polylang
The genericeventos slug supports multilingual URLs:
- Spanish:
/eventos/cumpleanos-premium/ - English:
/events/premium-birthday/ - French:
/evenements/anniversaire-premium/
evento post type in Settings > Polylang > Post Types.
Combining with Hinchables
Events can reference specific hinchables in the content:For more advanced event-hinchable relationships, consider using Advanced Custom Fields (ACF) with a relationship field.