Skip to content

Guest View

The Guest View function allows administrators to preview their site exactly as a logged-out visitor would see it. This is essential for testing visibility settings, logged-out user experience, and content restrictions.

Overview

Browse your site as a guest without logging out. Your session is temporarily suspended while you view the site as an anonymous visitor. Exit guest view at any time to return to your admin account.

Key Features

  • One-click switch to guest view
  • Floating exit button for easy return
  • Admin bar integration
  • Elementor widget available
  • Customizable button colors and position
  • Session preservation (you’re never actually logged out)

Setup Instructions

Step 1: Enable the Function

  1. Navigate to Voxel Toolkit → Functions in your WordPress admin
  2. Find Guest View in the list
  3. Toggle the switch to enable the function
  4. Click Save Changes

Step 2: Customize Appearance (Optional)

Configure the exit button’s appearance:

SettingDescriptionDefault
Button PositionCorner placement of exit buttonBottom Right
Background ColorButton background color#ff4444 (Red)
Text ColorButton text color#ffffff (White)

How to Use

Enter Guest View

There are multiple ways to enter guest view:

From Admin Bar

  1. While viewing your site’s frontend (logged in)
  2. Click View as Guest in the admin bar
  3. The page reloads showing the guest view

Using Elementor Widget

  1. Add the “Guest View” widget to any page
  2. Configure button text and styling
  3. Widget automatically shows for authorized users only

Exit Guest View

  1. Look for the floating “Exit Guest View” button (default: bottom right corner)
  2. Click the button
  3. Your admin session is restored immediately

How It Works

The function uses secure cookies to temporarily suspend your session:

  1. When entering guest view, your user ID is stored in an encrypted cookie
  2. WordPress authentication cookies are temporarily suspended
  3. The site renders as if you were a logged-out visitor
  4. When exiting, cookies are restored and you’re logged back in

Security Note

You are never actually logged out. Your session is preserved and can only be restored from the same browser. The stored user ID is encrypted for security.

Use Cases

Testing Content Visibility

Verify that member-only content is properly hidden from guests.

Login/Register Flow Testing

Test your login and registration pages as a new visitor would experience them.

SEO and Public Appearance

See exactly what search engines and public visitors see on your site.

Client Demonstrations

Show clients what their site looks like to public visitors without logging out.

Elementor Widget

An Elementor widget is included for placing a guest view toggle button anywhere on your site.

Widget Options

  • Button Text: Customize the toggle button text
  • Button Alignment: Left, center, or right alignment
  • Styling: Full control over colors, padding, and typography

Troubleshooting

Exit Button Not Appearing

  • Ensure you’re in guest view mode (check for the guest view cookie)
  • Check that the button isn’t hidden behind other elements (z-index issues)
  • Verify the function is enabled in settings
  • Clear browser cache

Can’t Exit Guest View

  • Clear all cookies for the site
  • Navigate directly to /wp-admin/ to log in normally
  • Try a different browser or incognito mode

Admin Bar Still Visible

The admin bar should be hidden in guest view. If it still appears:

  • Check for caching plugins that might be serving a cached version
  • Verify guest view is actually active (check cookies)

Built by Code Wattz.