Barar Menu Visibility Rules

外掛說明

Barar Menu Visibility Rules gives you granular control over which menu items are shown to your visitors. No coding required — configure everything directly in the WordPress menu editor.

Features

  • User Status — Show items to everyone, logged-in users, or logged-out users
  • User Roles — Target specific WordPress user roles (admin, editor, subscriber, etc.)
  • Specific Pages — Show or hide items on specific pages or URLs
  • Devices — Display items based on desktop, tablet, or mobile devices
  • Page Categories — Control visibility on category archive pages
  • Post Types — Show or hide on specific post type archives and single views
  • Date & Time — Schedule menu items to appear within specific date and time ranges
  • URL Parameters — Toggle visibility based on URL query parameters (e.g., ?campaign=summer)
  • Referral URL — Show or hide items based on the HTTP Referer header
  • Country — Target visitors by country using IP geolocation
  • City — Target visitors by city using IP geolocation
  • WooCommerce Cart — Show items based on cart status (requires WooCommerce)

Combine multiple conditions using AND/OR logic for advanced targeting. Lightweight, secure, and compatible with all modern WordPress themes.

Does this work with any theme?

Yes, this plugin works with any WordPress theme that uses the standard WordPress menu system.

Does it support WooCommerce?

Yes. When WooCommerce is active, a cart status condition type becomes available.

Can I combine multiple conditions?

Yes. You can add multiple conditions per menu item and choose between AND (all conditions must match) or OR (any condition must match) logic.

Does this plugin use external services?

Country and city conditions use ip-api.com (free) to determine visitor location based on IP address. Geolocation data is cached locally for 1 hour. No personal data is stored or transmitted beyond the IP address lookup. CloudFlare users can also use CF-IPCountry header.

How does country/city detection work?

The plugin detects visitor location using their IP address, checked against CloudFlare headers (if available) or the ip-api.com geolocation service. This data is cached per IP for one hour. If geolocation is unavailable, the condition is skipped (menu item remains visible).

螢幕擷圖

安裝方式

  1. Upload the plugin files to /wp-content/plugins/barar-menu-visibility-rules/, or install through the WordPress plugins screen.
  2. Activate the plugin through the Plugins screen.
  3. Go to Appearance > Menus and configure visibility rules on individual menu items.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Barar Menu Visibility Rules〉的開發相關工作。

參與者

將〈Barar Menu Visibility Rules〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.0

  • Initial release