Overview
The Visibility Controls Extension provides advanced options to show or hide blocks based on user roles, login status, dates, and other conditions. Perfect for creating personalized content, member-only sections, or time-sensitive displays without coding.
Key Features
- User Role Visibility: Show/hide based on WordPress user roles
- Login Status: Display for logged-in or logged-out users only
- Date/Time Scheduling: Show blocks during specific date ranges
- Query String Parameters: Conditional display based on URL parameters
- User Capability Checks: Show content based on specific capabilities
- Cookie-based Visibility: Track user interactions and show/hide accordingly
- Works with All Blocks: Apply to any WordPress block
How to Use
- Select any block you want to control
- Navigate to the Visibility tab in block settings
- Choose your visibility condition(s)
- Configure the specific parameters
- Combine multiple conditions if needed
- Preview behavior in different states
- Save and test on frontend
Visibility Conditions
User Authentication
- Logged In Users Only: Show block only to authenticated users
- Logged Out Users Only: Show block only to visitors
- Specific User Roles: Display for Administrator, Editor, Author, Subscriber, etc.
- Multiple Roles: Show to users with any of the selected roles
Date & Time Scheduling
- Start Date: Show block starting from a specific date/time
- End Date: Hide block after a specific date/time
- Date Range: Display only within a date range
- Recurring Schedule: Show on specific days or times
Advanced Conditions
- URL Parameters: Show if specific query string is present
- Referrer Source: Display based on where visitor came from
- Cookie Detection: Check for specific cookie values
- User Capabilities: Fine-grained capability-based visibility
Common Use Cases
- Member Content: Show premium content only to subscribers
- Login Prompts: Display login CTAs to logged-out users
- Welcome Messages: Greet logged-in users by role
- Limited Offers: Show promotions during specific dates
- Event Information: Display event details before event date
- Admin Notices: Show special messages to administrators
- Seasonal Content: Display holiday or seasonal content automatically
- A/B Testing: Show different content based on URL parameters
Combining Conditions
You can combine multiple visibility conditions using AND/OR logic:
- AND Logic: All conditions must be met (more restrictive)
- OR Logic: Any condition can be met (more permissive)
Example Combinations
- Show to Subscribers AND during March 1-31
- Show to logged-out users OR users without purchase capability
- Show if URL has ?promo=spring AND user is logged in
Best Practices
- Test visibility conditions in different user states
- Provide alternative content for users who cannot see hidden blocks
- Use clear naming for URL parameters
- Set reasonable date ranges with timezone considerations
- Document complex visibility rules for future reference
- Consider SEO impact of hidden content
- Use role-based visibility for security, not authentication
- Test with browser cookies disabled
Scheduling Tips
- Account for server timezone vs visitor timezone
- Set end dates to avoid content showing too long
- Use buffer time before/after critical dates
- Test scheduled content before publication date
Troubleshooting
- Block not hiding: Clear cache, verify user role/login status
- Date scheduling not working: Check server timezone settings
- Visibility conflicts: Review combined conditions logic
- Content visible to wrong users: Verify role assignments and capabilities