Sometimes you may want to show or hide the WordPress admin bar only on specific pages, post types, or URL patterns — regardless of the user role.
With Hide Admin Bar Pro, you can define a list of URL patterns where the admin bar should be hidden. This is especially useful for membership sites, checkout pages, or custom landing pages.
Common Use Cases #
- Hide admin bar on landing pages (
/welcome/,/pricing/) - Remove toolbar from WooCommerce pages like
/checkout/ - Hide on blog posts but show on dashboard or admin areas
- Combine with role or user-based settings for precision
How to Configure URL or Page-Based Visibility #
1. Open Plugin Settings #
Navigate to:
Settings → Hide Admin Bar
2. Scroll to the “Hide on URLs” Section #
This is a Pro-only setting. If you don’t see it, ensure the Pro version is activated.
3. Add URL Patterns #
Enter one pattern per line. Examples:
bashCopyEdit/checkout
/blog/*
/landing-page/
/courses/*/overview
Supported formats:
- Exact match:
/about-us - Wildcard match:
/blog/*matches anything under/blog/ - Post slugs, pages, and archive URLs are supported

4. Save Changes #
Click Save Changes at the bottom. Your rules take effect immediately.
Technical Details #
Admin bar is hidden only if the current page matches any of the defined patterns.
The plugin uses $_SERVER['REQUEST_URI'] to match against each line.
Patterns are converted into safe regular expressions behind the scenes.
Tips #
- Use leading slashes (
/example-page) - Do not include domain names — just the path
- Combine this setting with per-role logic for advanced control
FAQ #
Can I target post types or taxonomies?
Yes — use slugs like /category/news/ or /products/ as needed.
Does it work on WooCommerce pages?
Yes, you can target /shop/, /cart/, /checkout/, or any other page.
Will this work in the admin area (/wp-admin)?
No — this rule applies only to frontend URLs. Use the backend visibility settings for admin-specific rules.