- Register tag generators via wpcf7_admin_init hook - Add BnB Building select tag generator with first_as_label option - Add BnB Room select tag generator with building_field and include_price options - Add BnB Check-in date tag generator with min/max advance options - Add BnB Check-out date tag generator with checkin_field and min/max nights options - Add BnB Guests count tag generator with room_field and min/max/default options - All generators support id and class attribute configuration - Remove bug from Known Bugs section in CLAUDE.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WP BnB Management
A comprehensive Bed & Breakfast management system for WordPress. Manage buildings, rooms, bookings, and guests all within your WordPress admin.
Description
WP BnB Management enables WordPress to act as a full management system for B&B hosts. It handles multiple buildings with multiple rooms each, bookings, and guest data required for room rentals.
Key Features
- Multi-Property Support: Manage multiple buildings, each with multiple rooms
- Flexible Pricing: Configure short-term (nights), mid-term (weeks), and long-term (months) pricing
- Seasonal Pricing: Set price modifiers for high/low seasons
- Booking Management: Track reservations from inquiry to checkout
- Guest Management: Store guest information securely with GDPR compliance
- Data Encryption: Sensitive guest data (ID/passport) encrypted at rest
- Additional Services: Offer extras like breakfast, parking, or tours
- Frontend Integration: Gutenberg blocks, widgets, and shortcodes
- Auto-Updates: Automatic update checks and installation from license server
- Development Mode: License bypass for local development environments
- Contact Form 7 Integration: Accept booking requests and inquiries through CF7 forms
Requirements
- WordPress 6.0 or higher
- PHP 8.3 or higher
- Valid license key
- Contact Form 7 (optional, for booking forms)
Installation
- Download the latest release from the releases page
- Upload the plugin to your
/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Go to WP BnB → Settings → License to enter your license key
- Configure your business settings under WP BnB → Settings
Configuration
License Activation
- Navigate to WP BnB → Settings → License
- Enter your License Server URL
- Enter your License Key (from purchase confirmation)
- Enter the Server Secret (from purchase confirmation)
- Click Activate License
General Settings
- Business Name: Your B&B business name
- Currency: Select your preferred currency (CHF, EUR, USD, GBP)
- Business Address: Street, city, postal code, country
- Contact Information: Email, phone, website
- Social Media: Facebook, Instagram, X (Twitter), LinkedIn, TripAdvisor
Update Settings
- Update Notifications: Enable/disable update notifications in WordPress
- Automatic Updates: Enable/disable automatic plugin updates
- Check Frequency: How often to check for updates (1-168 hours)
Development Mode
The plugin automatically detects local development environments and bypasses license validation. Supported environments:
- localhost, 127.0.0.1, ::1
- Domains ending in .local, .test, .localhost, .dev, .ddev.site
- Private IP ranges (10.x.x.x, 172.16-31.x.x, 192.168.x.x)
Usage
Managing Buildings
- Go to WP BnB → Buildings
- Click Add New
- Enter building details (name, address, description)
- Add featured image
- Publish
Managing Rooms
- Go to WP BnB → Rooms
- Click Add New
- Select the parent building
- Configure room details and pricing
- Add amenities and room type
- Publish
Managing Bookings
- Go to WP BnB → Bookings
- View and manage all reservations
- Update booking status as guests progress
Managing Guests
- Go to WP BnB → Guests
- View guest records and booking history
- Manage guest information
Shortcodes
Display buildings and rooms on your site using shortcodes:
[bnb_buildings] - List all buildings (grid/list layout)
[bnb_rooms building="123"] - List rooms, optionally filtered by building
[bnb_room_search] - Interactive room search form
[bnb_building id="123"] - Display a single building
[bnb_room id="456"] - Display a single room with availability
Shortcode Attributes
[bnb_buildings] and [bnb_rooms]:
layout- "grid" or "list" (default: grid)columns- 1-4 columns (default: 3)limit- Number of items (default: 12)orderby- title, date, price, capacity (default: title)order- ASC or DESC (default: ASC)
[bnb_rooms] additional attributes:
building- Building ID to filter byroom_type- Room type slug to filter byamenities- Comma-separated amenity slugs
Gutenberg Blocks
The following blocks are available in the block editor:
- Building - Display a single building with details
- Room - Display a single room with availability form
- Room Search - Interactive search form with filters
- Buildings List - Display buildings grid/list
- Rooms List - Display rooms grid/list with filters
Widgets
Available sidebar widgets:
- Similar Rooms - Show rooms from same building or room type
- Building Rooms - List all rooms in a building
- Availability Calendar - Mini calendar showing booking status
Contact Form 7 Integration
The plugin integrates with Contact Form 7 to accept booking requests and inquiries. Custom form tags are provided for room selection, date pickers, and guest counts.
Custom Form Tags
Use these tags in your CF7 forms:
[bnb_building_select name]- Building dropdown (optional filter for rooms)[bnb_room_select* name]- Room dropdown with capacity data[bnb_date_checkin* name]- Check-in date picker[bnb_date_checkout* name]- Check-out date picker[bnb_guests* name]- Guest count input
Tag Options
[bnb_building_select]:
first_as_label:"text"- Placeholder text (default: "All Locations")
[bnb_room_select]:
building_field:"name"- Link to building field for filteringfirst_as_label:"text"- Placeholder text (default: "Select Room")
[bnb_guests]:
min:N- Minimum guests (default: 1)max:N- Maximum guests (default: 10)default:N- Default value (default: 1)
Example Booking Form
<div class="wp-bnb-booking-form">
<h3>Book Your Stay</h3>
<div class="wp-bnb-form-row">
[bnb_building_select building first_as_label:"All Locations"]
</div>
<div class="wp-bnb-form-row">
[bnb_room_select* room building_field:"building" first_as_label:"Select a Room"]
</div>
<div class="wp-bnb-form-row-2col">
<div class="wp-bnb-form-field">
<label>Check-in</label>
[bnb_date_checkin* check_in]
</div>
<div class="wp-bnb-form-field">
<label>Check-out</label>
[bnb_date_checkout* check_out]
</div>
</div>
<div class="wp-bnb-availability-status"></div>
<div class="wp-bnb-form-row">
<label>Number of Guests</label>
[bnb_guests* guests min:1 max:10 default:2]
</div>
<div class="wp-bnb-price-display"></div>
<h4>Your Information</h4>
<div class="wp-bnb-form-row-2col">
<div class="wp-bnb-form-field">
<label>First Name</label>
[text* first_name]
</div>
<div class="wp-bnb-form-field">
<label>Last Name</label>
[text* last_name]
</div>
</div>
<div class="wp-bnb-form-row">
<label>Email</label>
[email* your_email]
</div>
<div class="wp-bnb-form-row">
<label>Phone</label>
[tel your_phone]
</div>
<div class="wp-bnb-form-row">
<label>Message</label>
[textarea your_message]
</div>
[submit "Request Booking"]
</div>
Example Inquiry Form
For room-specific inquiries, add the wp-bnb-inquiry-form class:
<div class="wp-bnb-inquiry-form">
<h3>Inquire About This Room</h3>
[hidden room default:123]
<div class="wp-bnb-form-row">
<label>Your Name</label>
[text* your_name]
</div>
<div class="wp-bnb-form-row">
<label>Email</label>
[email* your_email]
</div>
<div class="wp-bnb-form-row">
<label>Your Question</label>
[textarea* your_message]
</div>
[submit "Send Inquiry"]
</div>
Form Features
- Availability Checking: Real-time AJAX validation shows room availability
- Price Display: Estimated total calculated and displayed automatically
- Room Filtering: Rooms filter by building selection
- Date Validation: Check-out must be after check-in, no past dates
- Capacity Validation: Guest count validated against room capacity
- Automatic Booking: Booking record created with "pending" status on submission
- Guest Linking: Guest records created or linked by email address
Custom Mail Tags
Use these in your CF7 mail templates:
[_bnb_room_name]- Room title[_bnb_building_name]- Building name[_bnb_calculated_price]- Formatted price[_bnb_nights]- Number of nights[_bnb_booking_reference]- Booking reference (after creation)
Hooks and Filters
Developers can customize behavior using these hooks:
// Modify price calculation
add_filter( 'wp_bnb_calculate_price', function( $price, $room_id, $dates ) {
// Custom pricing logic
return $price;
}, 10, 3 );
// Before booking creation
add_action( 'wp_bnb_before_booking_create', function( $booking_data ) {
// Custom validation or logging
} );
Frequently Asked Questions
Do I need a license to use this plugin?
Yes, a valid license is required to use the frontend features in production. The admin functionality works without a license for evaluation purposes. Local development environments (localhost, .local, .test, .dev domains) automatically bypass license validation.
Can I manage multiple properties?
Yes, you can create unlimited buildings and rooms.
Is the plugin GDPR compliant?
Yes, guest data can be exported and deleted on request, and consent is tracked appropriately.
Does it integrate with WooCommerce?
WooCommerce integration for payments is planned for a future release.
How is guest data secured?
Sensitive guest data like passport/ID numbers are encrypted using AES-256-CBC encryption before storage. The encryption key is derived from your WordPress AUTH_KEY, ensuring data is secure at rest.
Changelog
See CHANGELOG.md for a detailed list of changes.
Support
For support, please create an issue at: https://src.bundespruefstelle.ch/magdev/wp-bnb/issues
Author
Marco Graetsch
- Website: https://src.bundespruefstelle.ch/magdev
- Email: magdev3.0@gmail.com
License
GPL-2.0-or-later
This plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version.