Automatic Post Creation
Automatically create and update WordPress posts for travel packages so your site always shows the latest offerings.
The Travel Agent plugin automatically creates and updates WordPress posts when packages are added or changed. No manual steps are needed.
1. Trigger Points
- On New Package:
Triggered when a new package is added in the backend (like Acuo travel Agent Operations). - On Package Update:
Triggered when a package is updated and no corresponding post exists.
2. Post Creation Logic
2.1 Template-Based Creation
- The plugin checks for a template_id associated with the package (e.g.,
42). - If a template is present, the structure—including title, shortcodes, and layout—is cloned into a new WordPress post.
2.2 Fallback Creation
- If no template is specified, the plugin generates a blank post:
- Title: Uses the package title.
- Content: Includes the excerpt, images, and a default booking button element.
3. Post Updating
If an existing package is updated and its corresponding post has been deleted or is missing, the creation logic above is automatically re-executed to restore the post.
4. Post Details
- Content:
Each post includes the package title, excerpt, featured image(s), and a booking button (if specified in the template). - Status:
- Packages marked as “Available” are set to
published. - Packages marked as “Draft” or “Pending” are set to
draft.
- Packages marked as “Available” are set to
- Visibility:
Determined by the Post Status setting inSettings → Travel Agent. - Taxonomies:
The plugin automatically assigns the following taxonomies:- Destination: Based on the package destination.
- Experience: Based on the package experience.
- Period: Based on the departure date.
5. Configuration
To enable and configure automatic post creation, navigate to Settings → Travel Agent in your WordPress admin dashboard:
- Integration Status: Set to
Liveto activate automatic post creation and updates. - Post Status: Specify the minimum post status required for frontend visibility (default:
published).