Skip to main content
View Categories

User Dashboard Shortcode

2 min read

The User Dashboard shortcode provides a complete frontend interface for user account management, reservations, and property favorites.

Usage #

[homerunner-user-dashboard]

Features #

Authentication Management #

  • Handles user login/logout
  • Registration functionality
  • Password reset flow
  • Lost password recovery
  • Automatic redirects for authenticated users

Dashboard Sections #

Main Dashboard #

  • Overview of user activity
  • Quick access to reservations and favorites
  • Account status information

Reservations #

  • List of current and past reservations
  • Detailed reservation information
  • Booking status tracking
  • Access to booking documents

Favorites #

  • Saved property listings
  • Quick access to favorite properties
  • Property comparison capabilities

Account Settings #

  • Profile management
  • Communication preferences
  • Account security settings

Template Customization #

The dashboard uses a template-based system for easy customization:

  • Templates located in `/templates/user-dashboard/`
  • Section-specific template files
  • Customizable through WordPress theme overrides
  • Support for custom sections through template additions

Available Templates #

  • dashboard.php – Main dashboard view
  • reservations.php – Reservations list
  • reservation.php – Single reservation details
  • favorites.php – Favorite properties
  • account-settings.php – User account settings
  • login.php – Authentication forms
  • 404.php – Not found template

Technical Notes #

Security Features #

  • Protected routes for authenticated users
  • Secure password reset flow
  • Form validation and sanitization
  • CSRF protection on forms

Multi-PMS Compatibility #

The shortcode maintains compatibility with various Property Management Systems through:

  • System-agnostic user data handling
  • Unified dashboard interface across different PMS integrations
  • Consistent template structure
  • Support for legacy shortcode tags from different PMS integrations

State Management #

  • Handles various user states (logged in/out)
  • Section-based content loading
  • Dynamic title management
  • Automatic script and style enqueuing

URL Parameters #

ParameterDescription
sectionDashboard section to display (dashboard, reservations, favorites, etc.)

Sections #

Section NameDescription
dashboardMain dashboard overview
reservationsList of user reservations
reservationSingle reservation details
favoritesFavorite properties list
account_settingsUser profile and settings
loginLogin form (logged-out users)
registrationRegistration form (logged-out users)
lostpasswordPassword recovery (logged-out users)
resetpasswordPassword reset form (logged-out users)

Examples #

Basic Implementation #

[homerunner-user-dashboard]

Integration Notes #

  • Automatically handles script and style dependencies
  • Integrates with WordPress user system
  • Supports custom user roles and capabilities
  • Compatible with various authentication plugins
  • Maintains session security
  • Supports template overrides through themes