The Holidays plugin provides a way for WordPress site owners to list, organize, and showcase holiday destinations. It features an intuitive, custom post type Destination
where the site owner can add details about the holiday destinations.
The plugin also exposes RESTful APIs to retrieve deals and request brochures for holiday destinations.
The plugin uses shortcodes to help you easily add the destinations to any post or page on your site.
- Upload the Holidays plugin folder to the
/wp-content/plugins/
directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Navigate to the
Destinations
menu option in your WordPress dashboard. - Click on
Add New
to create a new destination. - Add a title, content, and a featured image for your destination.
- Click
Publish
.
Add the [holiday-destinations]
shortcode to any page or post where you want the holiday destinations to be displayed.
The plugin offers the following APIs:
GET /v1/holidays/deals
: Returns a list of deals.POST /v1/holidays/request_brochure
: Allows users to request a brochure. The request body should contain 'name', 'email', and 'address'.
You can customize the look of the destinations list by overriding the styles from app.css
file in your theme's CSS.
- Error handling: Any errors caught in the code are sent to a log function, which should be replaced with actual logging logic.
- API Key: The API key in the
sendBrochureApiRequest
function is a placeholder and should be replaced with an actual API key.
- Initial version
For support, feature requests, or bug reporting, please send an email to [email protected]