Templates
CruiseAppy uses a set of PHP template files to render dynamic plugin output and provide a customizable user interface for both frontend users and administrators. These templates are designed for flexibility, allowing site owners to override or extend layouts as needed.
Template Directory
- Located in the
templates/folder within the CruiseAppy plugin. - Organized by feature (e.g., cruise listings, booking forms, itinerary details, search results).
Key Templates
| Template File | Purpose |
|---|---|
booking-form-*.php |
Renders the multi-step booking form, including passenger details and payment options. |
vmb-*.php |
Renders view my booking templates, including booking and contact info. |
Customization
- Templates can be overridden by copying them to your theme directory (e.g.,
wp-content/themes/your-theme/cruiseappy/). - Use WordPress hooks and filters to inject custom logic or modify output without editing core plugin files.
- CSS and JS assets referenced in templates are located in the
css/andjs/directories.
Integration
- Templates interact with plugin classes and helpers to fetch and display data.
- Support for Advanced Custom Fields (ACF) allows for extended metadata and custom layouts.
- Responsive design ensures usability across devices.
Best Practices
- Avoid direct modification of plugin templates to ensure compatibility with future updates.
- Use child themes or custom plugin extensions for advanced customizations.