# 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 - **Dashboard**: Comprehensive admin dashboard with statistics and charts - **Reports**: Detailed reports with CSV and PDF export - **Prometheus Metrics**: Expose operational metrics for monitoring with Grafana ### Requirements - WordPress 6.0 or higher - PHP 8.3 or higher - Valid license key - Contact Form 7 (optional, for booking forms) ## Installation 1. Download the latest release from the [releases page](https://src.bundespruefstelle.ch/magdev/wp-bnb/releases) 2. Upload the plugin to your `/wp-content/plugins/` directory 3. Activate the plugin through the 'Plugins' menu in WordPress 4. Go to **WP BnB → Settings → License** to enter your license key 5. Configure your business settings under **WP BnB → Settings** ## Configuration ### License Activation 1. Navigate to **WP BnB → Settings → License** 2. Enter your License Server URL 3. Enter your License Key (from purchase confirmation) 4. Enter the Server Secret (from purchase confirmation) 5. 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 1. Go to **WP BnB → Buildings** 2. Click **Add New** 3. Enter building details (name, address, description) 4. Add featured image 5. Publish ### Managing Rooms 1. Go to **WP BnB → Rooms** 2. Click **Add New** 3. Select the parent building 4. Configure room details and pricing 5. Add amenities and room type 6. Publish ### Managing Bookings 1. Go to **WP BnB → Bookings** 2. View and manage all reservations 3. Update booking status as guests progress ### Managing Guests 1. Go to **WP BnB → Guests** 2. View guest records and booking history 3. Manage guest information ### Dashboard The dashboard (**WP BnB → Dashboard**) provides an at-a-glance overview of your B&B operations: **Statistics Cards:** - **Occupancy Rate** - Current percentage of rooms occupied with trend indicator - **Monthly Revenue** - This month's revenue with comparison to previous month - **Total Bookings** - Active bookings count with status breakdown - **Total Guests** - Guest count with new guests this month **Today's Activity:** - Check-ins scheduled for today with guest names and room assignments - Check-outs scheduled for today - Quick links to manage each booking **Upcoming Bookings:** - Next 7 days of arrivals - Guest name, room, dates, and booking status - Direct links to booking details **Quick Actions:** - New Booking - Create a booking directly - New Guest - Add a guest record - View Calendar - Open the availability calendar - View Reports - Access detailed reports **Trend Charts:** - 30-day occupancy trend line chart - 6-month revenue bar chart ### Reports Access detailed reports at **WP BnB → Reports**. All reports support date range filtering and export. **Occupancy Report:** - Overall occupancy percentage for the selected period - Breakdown by room showing nights booked, available, and occupancy rate - Visual progress bars for easy comparison - Total nights booked vs. available across all rooms **Revenue Report:** - Total revenue for the selected period - Revenue breakdown by room - Revenue breakdown by pricing tier (short-term, mid-term, long-term) - Revenue from additional services - Average booking value **Guest Statistics:** - Total guests and new guests in period - Repeat guest rate (guests with 2+ bookings) - Top guests by total spending - Guest nationality distribution - Average spending per guest **Export Options:** - **CSV Export** - Download report data as spreadsheet-compatible CSV - **PDF Export** - Generate formatted PDF reports for printing or archiving **Date Filters:** - This Month (default) - Last Month - This Year - Custom date range ## Shortcodes Display buildings and rooms on your site using shortcodes: ```txt [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 by - `room_type` - Room type slug to filter by - `amenities` - 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 filtering - `first_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 ```txt