Linux 软件免费装
Banner图

Widget Visibility Control

开发者 fernandot
ayudawp
更新时间 2026年5月16日 06:06
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

jetpack widget options widget logic widget visibility conditional widgets

下载

1.3.0 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.2.0

详情介绍:

Widget Visibility Control lets you decide exactly where each widget appears on your site. Show widgets only on specific pages, hide them for logged-out users, display different content for different categories - all without writing a single line of code. Looking for Widget Visibility and Scheduling? This plugin gives you control over where your widgets appear: Multiple Conditions Create sophisticated visibility rules by combining multiple conditions: Built for Performance Why Choose This Plugin? Coming from Jetpack? If you've been using Jetpack just for widget visibility and want to reduce your site's load, this plugin can help: Coming from Widget Logic? Widget Logic has been closed on the WordPress plugin directory. Widget Visibility Control is a safe, maintained alternative: Coming from Widget Options? If you only use Widget Options for visibility and want a lighter, focused plugin without the pro upsells: Developer Friendly

安装:

  1. Upload the widget-visibility-control folder to /wp-content/plugins/
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Configure visibility rules for your widgets (see "Where to find visibility settings" below)
Where to find visibility settings The location of visibility settings depends on your widget editing interface: In Appearance > Widgets (block editor): When using native block widgets, select any block in a widget area, then look in the right sidebar for the Visibility panel. Here you can add rules to show or hide the block. In Appearance > Widgets (with Classic Widgets plugin): If you have the Classic Widgets plugin active, click the "Visibility" button that appears below each widget's settings. In Appearance > Customize > Widgets: The Customizer always uses the classic interface. Click the "Visibility" button below each widget's settings to configure rules. Legacy Widgets in block editor: When you add a Legacy Widget block, expand the widget settings and you'll find the "Visibility" button in the classic interface within the block. Coming from Jetpack? Your existing visibility rules will be automatically imported. Visit Appearance > Widget Visibility to review your imported data.

屏幕截图:

  • Visibility Options settings on block based widgets
  • Multiple conditions with AND/OR logic
  • Settings page with data management options

升级注意事项:

1.3.0 Adds import from Widget Logic (5.x and 6.x) with assisted wizard and per-widget decisions. Redesigned Settings with Overview/Import-Export tabs, source-aware summary card, and a fix for the Jetpack data counter false positive.

常见问题:

Does this work with the block-based widget editor?

Yes! Widget Visibility Control works with all widget editing interfaces:

  • Block-based widgets (Appearance > Widgets): Visibility settings appear in the Visibility panel in the right sidebar.
  • Legacy Widgets in the block editor: The classic "Visibility" button appears within the legacy widget interface.
  • Classic Widgets plugin: If you prefer the traditional widget interface, the "Visibility" button appears below each widget.
  • Customizer (Appearance > Customize > Widgets): Always uses the classic "Visibility" button interface.

I'm using Jetpack. Will my visibility rules be preserved?

Yes. On activation, the plugin automatically imports all your existing Jetpack Widget Visibility rules. No reconfiguration needed.

Can I use this alongside Jetpack?

Yes, but to avoid conflicts, our visibility interface is automatically disabled while Jetpack Widget Visibility module is active. You can continue using Jetpack's interface, and when you disable the Jetpack module, our interface will take over automatically. Your visibility rules are stored in both formats, so the transition is seamless.

What happens if I deactivate or uninstall this plugin?

On deactivation, your rules are preserved for when you reactivate. On uninstall, only this plugin's data is removed. If you haven't cleaned the legacy data, Jetpack can still read your original rules.

Can I use multiple conditions on a single widget?

Yes. You can add multiple conditions and choose whether ALL conditions must match (AND logic) or just ONE condition needs to match (OR logic).

Does this plugin slow down my site?

No. The plugin is optimized for performance with intelligent caching. Assets only load on admin widget screens, and frontend checks are minimal and cached.

Does this require a WordPress.com connection?

No. This plugin works completely standalone without any external connections or dependencies.

Does this work with full site editing (FSE) themes?

This plugin is designed for widget areas (sidebars, footers, etc.). Full Site Editing themes typically don't use traditional widget areas - instead, they manage all content through the Site Editor using template parts and blocks. If your FSE theme includes widget areas, the plugin will work in those areas. If you need conditional visibility for blocks in FSE templates, you would need a different solution designed for the Site Editor.

How does time scheduling work?

Time scheduling allows you to show or hide widgets during specific date and time ranges. This is ideal for:

  • Promotional banners - Display ads only during sale periods
  • Seasonal content - Show holiday greetings or seasonal offers automatically
  • Flash sales - Schedule countdown widgets for limited-time deals
  • Event announcements - Display event info until the event date passes
  • Time-sensitive notices - Show maintenance warnings or temporary announcements
You can configure:
  • Show only during period - Widget appears only between the start and end dates
  • Hide during period - Widget is hidden between the start and end dates
  • No end date - Widget starts showing from a specific date and continues indefinitely
The schedule uses your WordPress timezone setting (Settings > General). If you also have visibility rules configured (like "show only on homepage"), both conditions must be met - the widget will only appear on the homepage AND within the scheduled time range.

How does the taxonomy selector work on sites with many taxonomies?

When you select "Taxonomy" as a condition, a second dropdown appears where you pick the specific taxonomy (e.g., Product Category, Color, Size). Only then does the third dropdown show the terms for that taxonomy. This cascading approach makes it much faster to find the right term on WooCommerce sites or any site with many custom taxonomies. For hierarchical taxonomies, you can also check "Include children" to automatically match all child terms of the selected term.

Can I import my rules from Widget Logic?

Yes, both from Widget Logic 5.x and 6.x — they use the same storage format in the database. When the plugin detects Widget Logic data, you'll see a notice and a section in Appearance > Widget Visibility > Import / Export. The importer shows each widget that had Widget Logic code, the original PHP, and the rule we extracted. For widgets whose code we can't translate automatically, you decide per widget: import as always visible, import as always hidden, or skip.

What Widget Logic functions are supported on import?

Phase 1 supports the most common conditional tags: is_home, is_front_page, is_single (for posts), is_singular (with a post type), is_page (with ID or slug), is_category, is_tag, is_author, is_archive, is_search, is_404, is_date / is_day / is_month / is_year, is_user_logged_in, is_tax, is_post_type_archive, in_category, and has_tag. Combinations using only AND or only OR (not mixed) are supported. Mixed AND/OR trees, current_user_can, is_active_sidebar, code that uses variables or superglobals, and custom functions are not translated automatically — the importer asks you what to do per widget.

Will my Widget Logic data be deleted after import?

No. The original Widget Logic data stays in the database so you can roll back if needed. From Appearance > Widget Visibility > Import / Export you can delete it later with "Remove Widget Logic data".

Can I import my rules from Widget Options?

Not yet. Widget Options stores its visibility data in a format that's very different from Widget Logic and Jetpack, and an importer is a separate effort. If you only used Widget Options for visibility, you can configure the equivalent rules in our plugin manually — the most common scenarios (pages, post types, taxonomies, user roles, login state) are all supported.

更新日志:

1.3.0