[WordPress] 外掛分享: Conditional Blocks – Advanced Content Visibility Control for WordPress

WordPress 外掛 Conditional Blocks – Advanced Content Visibility Control for WordPress 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Conditional Blocks – Advanced Content Visibility Control for WordPress」是 2019-07-28 上架。
  • 目前有 2000 個安裝啟用數。
  • 上一次更新是 2025-04-16,距離現在已有 18 天。
  • 外掛最低要求 WordPress 5.5 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
  • 有 14 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

morganhvidt |

外掛標籤

hide | control | restrict | visibility | display logic |

內容簡介

「Conditional Blocks」可以讓你為你的訪客和客戶創建獨特的內容。使用 WordPress 区块编辑器中的可见性控制现在变得更加容易。

发挥创意,使用动态内容构建模板 - 你可以更改区块为可见或隐藏、分组的区块以及每个嵌套的区块即可重复使用的区块!如果你有任何想法,我們打算让「Conditional Blocks」为整个网站编辑(FSE)主题做好准备。

「Conditional Blocks」可以做什么?

「Conditional Blocks」可以让你轻松点击几下更改任何区块的可见性。查看以下功能以获取有关 WordPress 中条件内容的想法。

免费版中包含的条件类型:

- 为 WordPress 区块创建自定义可见性条件。
- 使用“锁定”条件隐藏所有人的区块。在准备新内容时非常棒。
- 根据用户状态(已登录的用户或未登录的用户)显示或隐藏区块。为已登录用户创建会员内容非常棒。
- 在移动屏幕上显示或隐藏区块。
- 在平板电脑屏幕上显示或隐藏区块。
- 在桌面屏幕上显示或隐藏区块。
- 根据你的主题的 CSS 断点修改屏幕大小以适合设备。

你可以在侧边栏中使用任何内置可见性逻辑创建条件小部件。与 WordPress 区块小部件和完整网站编辑主题完全兼容。

使用「Conditional Blocks Pro」做更多

我们将「Conditional Blocks Pro」设计成灵活的,并允许你为广泛的可见性条件切换区块。独家包括设置 WooCommerce 条件内容的能力。

专业版中包括的内容:

- 根据用户角色显示区块(WooCommerce 客户端、管理员、编辑、订阅者、自定义角色等)。
- 根据日期范围、时间、星期几显示区块内容。
- 为任何设备和浏览器(HTTP 用户代理)显示区块(iPhone、Android、macOS、Linux 和 Windows)。
- 根据 URL 引荐者显示区块(例如如果用户来自 Google.com 或 twitter.com)。
- 根据帖子元字段显示区块,包括自定义元字段和数据。
- 根据 URL 查询字符串(URL 变量)显示区块,你可以为与 Gravity Forms 等表单插件相关的自定义确认内容显示内容。
- 根据帖子 ID 显示区块或在帖子 ID 和 URL 路径上隐藏区块。
- 根据帖子、自定义帖子类型、分类法和术语显示区块。自动检测自定义分类法和术语。
- 显示自定义字段、用户元数据、帖子元数据的区块。
- 根据归档切换区块。
- 创建和管理条件预设,以应用于整个网站上的多个区块。
- 根据 PHP 逻辑和自定义函数显示区块。自定义条件拥有无限的可能性。
- WooCommerce - 根据当前客户的总购物车价值更改区块的可见性。完美的升级销售策略。
- WooCommerce - 我们甚至会推出更多的 WooCommerce 区块条件,每个条件都将帮助你为智能营销创建动态升级销售。
- WooCommerce 中购物车中的商品、当前客户端总购物车价值、在商店中消费的总客户端价值。
- WooCommerce 地理位置 - 使用客户端的 IP 地址根据客户端的国家切换任何 WordPress 区块的可见性。
- WooCommerce 客户端最近订单 -

原文外掛簡介

Conditional Blocks is a powerful, no code plugin that allows you to control the visibility of any WordPress blocks within the Block Editor (Gutenberg) using advanced display logic.
Replace multiple plugins with our versatile Conditional Blocks, developed for fast paced freelancers and agencies.
🌏 Get the full overview on conditionalblocks.com
Create Better Sites with Less Plugins 🤩
Everything is block in modern WordPress development with Full Site Editing (FSE). In plain words, you apply conditional display logic to everything.
Here’s some example use-cases where Conditional Blocks shines.

Dynamic headers, navigation and menus,
Cart Messages
CTA & Marketing sections
Restrict content & Access control
Membership content
Content Control
And much more..

What’s Included in Conditional Blocks FREE
The free version of Conditional Blocks offers 3 visibility conditions + The Conditions API for creating your own conditions .

Lockdown condition:
Hide blocks from everyone, perfect for preparing new content or working on drafts.
User Status:
Display content exclusively for logged-in or logged-out users, ideal for membership site content.
Responsive designs:
Control block visibility on mobile, tablet, and desktop screens for responsive designs.
You can edit the CSS Breakpoints to match your theme too.
Developer Focused:
Create Custom Visibility Conditions for WordPress Blocks, such as custom user roles or membership levels. You can easily create your own integrations using code snippets.

The free version is limited.
Consider joining our PRO community to create better WordPress sites & support development.
The Full Toolkit with Conditional Blocks Pro ✨
Conditional Blocks Pro unlocks the full suite of advanced block visibility conditions and integrations, allowing you to create truly dynamic and personalized user experiences:
🎯 Advanced Audience Targeting (Pro)

Geolocation: Target or exclude visitors based on their Country or Continent using their IP address. Ideal for region-specific content, offers, or compliance.
User Role: Precisely control visibility for specific user roles (Admin, Editor, Subscriber, WooCommerce Customer, custom roles, etc.).
Device & Browser: Tailor experiences by showing/hiding blocks based on device type (iPhone, Android, Tablet, Desktop) or browser (Chrome, Firefox, Safari, etc.).
Referrer URL: Display unique content to visitors arriving from specific sources like Google, X/Twitter, or other websites.

⚙️ Dynamic & Automated Content (Pro)

Scheduling: Automate your content calendar! Display blocks only during specific date ranges, times of day, or days of the week – perfect for sales, events, or timely announcements.
Post Meta & Custom Fields: Leverage your existing data by showing or hiding blocks based on post meta or custom field values (including ACF).
URL Query String: Create dynamic landing pages or respond to campaign parameters by controlling visibility based on URL query strings.
HTTP Cookies: Adapt content based on visitor cookie values for advanced tracking or personalization (Pro).
Content Specificity: Target blocks to specific Post IDs, URL paths, Post Types, Taxonomies (like categories or tags), and even specific Terms.
User Meta: Personalize content based on individual user metadata.
Archive Pages: Show or hide blocks specifically on WordPress archive pages.

🔌 Powerful Integrations (Pro)
Integrations are automatically available when the supported plugin is active.

Advanced Custom Fields (ACF): Create hyper-personalized experiences by controlling block visibility based on your ACF field values. (Learn More)
WooCommerce: Boost sales and improve shop UX! Show targeted messages based on cart total, products in cart, purchased products, or customer details. (Learn More)
Easy Digital Downloads (EDD): Enhance your digital store with conditions based on cart value, purchased products, products in cart, or cart item categories. (Learn More)
Paid Memberships Pro (PMPro): Easily restrict content based on membership levels, status, or specific user field data. (Learn More)
MetaBox: Control block visibility based on the values stored in your MetaBox custom fields. (Learn More)
ProfilePress: Restrict content visibility based on users’ active membership plans in ProfilePress. (Learn More)

🚀 Workflow Boosters (Pro)

Condition Presets: Save frequently used condition combinations and reuse them across your site with a single click.
Custom PHP Logic: Implement highly specific or complex visibility rules using your own custom PHP functions.
Combine with AND/OR Logic: Build sophisticated visibility rules by grouping multiple conditions with flexible AND/OR logic.

See all Conditional Blocks Pro features & integrations
Advanced Usage
Managing WordPress content via blocks becomes easier when you know the tips & tricks. You can find more on our blog.
Draft content on live pages
Use the Lockdown condition to create draft blocks inside live content, and simply remove the condition when you’re ready to publish. You don’t have to worry about people seeing the content before it’s complete. Using the Lockdown Condition eliminates need to create a separate draft page.
Apply Conditions to Groups
One of our favorite methods of managing WordPress content is to use Group Blocks. If you setup a Group Blocks you can set conditions directly the Group, this means that all nested blocks inside the Group will automatically follow the same visibility conditions.
Design Patterns
Yes it’s also possible to pre-make dynamic templates using Conditional Blocks. You’ll have to make use of the WordPress Design Patterns. Simply make a patterns as you’ve also done while applying the visibility rules.
The patterns will be ready and be conditionally displayed when you insert it on a page. We personally use the same method on Synced Patterns too. (Previously known as Reusable Blocks in Gutenberg).
Restrictive content made easy
Control access to any block by clicking on it within the Block Editor and using the Condition Builder to add visibility rules. Perfect for members-only content.
Responsive designs simplified
Effortlessly adapt your blocks for mobile, tablet, or desktop display, automatically showing or hiding content according to screen sizes.
LEARN MORE

Get Pro: See pricing & go Pro today.
Documentation: Learn how to set up and use our features.
Blog: Read our guides and tutorials.
Website: Find out more about us and the PRO version.
X (Twitter): Follow us on X.

MORE Block Plugins

Find My Blocks: Locate all instances of blocks across your WordPress pages.

Compatibility
Conditional Blocks works with any theme or plugin that uses the WordPress Block Editor (also known as Gutenberg). Block widget & Full Site Editing (FSE) within themes are also supported.
Tested and compatible with:

Stackable Blocks
Spectra Blocks
Atomic Blocks
CoBlocks
Editorskit
WooCommerce Blocks (Product Blocks)
Easy Digital Downloads Blocks
Ultimate Addons for Gutenberg
Otter Blocks & Templates
GenerateBlocks
Kadence Blocks
Kadence Theme
Genesis Blocks
Twenty Twenty-Two theme
Twenty Twenty-Four theme
Wabi theme
Poe theme
WooCommerce Storefront
WordPress Site Editor
Gutenberg
WordPress Site Templates
OllieWP theme

For support or help with other plugins, please get in touch.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Conditional Blocks – Advanced Content Visibility Control for WordPress」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.3 | 1.0.4 | 2.0.0 | 2.0.1 | 2.3.0 | 2.4.0 | 2.4.2 | 2.5.0 | 2.5.3 | 2.5.4 | 2.6.0 | 3.0.0 | 3.0.1 | 3.0.2 | 3.0.4 | 3.0.5 | 3.0.7 | 3.1.0 | 3.1.1 | 3.1.3 | 3.1.6 | 3.2.1 | trunk |

延伸相關外掛(你可能也想知道)

  • WP Ghost (Hide My WP Ghost) – Security & Firewall 》Hide My WP Ghost 是一個 WordPress 安全外掛,透過強大且易於使用的功能,提供最佳的安全解決方案。它可以在不改變任何目錄或檔案的情況下,將網站的安全性...。
  • Email Encoder – Protect Email Addresses and Phone Numbers 》專門為電子郵件地址設計的全站保護外掛,可防止垃圾郵件機器人、電子郵件收割機和其他機器人攻擊。無需任何配置。, 此外,使用我們集成的[eeb_protect_conten...。
  • If Menu – Visibility control for Menus 》藉由可見度規則,您可以控制網站訪客看到哪些選單項目。以下是一些範例:, , 僅顯示選單項目,當 使用者已登入, 當裝置為行動裝置時,隱藏選單, 顯示選單 給...。
  • Dynamic Visibility for Elementor 》Dynamic Visibility 擴充套件讓您可以隱藏小工具、欄位、容器、區段或頁面。, 當您正在建立不想向所有人展示的內容時,這尤其有用。, 這是一個 Elementor 的...。
  • Hide/Remove Metadata 》Hide/Remove Metadata是一款免費、簡單而非常實用的WordPress外掛,能夠幫助您輕鬆地隱藏或刪除網站上的作者和發布日期。該外掛非常容易使用,僅提供隱藏或移...。
  • Hide Admin Bar 》這個 WordPress 外掛可以隱藏 WordPress 3.1+ 的管理員工具列,感謝 Yoast 和 Pete Mall 的貢獻。如果你喜歡這個外掛,可以考慮請買我一杯咖啡。。
  • WordPress Hide Posts 》這個外掛可以讓你隱藏首頁、分類頁、搜索頁、標籤頁、作者頁、RSS Feed、REST API、文章導覽和原生最近文章小工具的任何文章。, 試試看 Demo, 功能:, , 使用...。
  • Hide My Site 》選擇一個密碼以保護整個 WordPress 網站,只有知道此密碼的訪客才能存取您的 WordPress 網站。這是一個完美的工具,適合建立 WordPress 網站開發版本或者任何...。
  • Hide Featured Image 》有些情況下,我們可能想在某個單獨的文章頁面上顯示特色圖片,但另一些文章頁面則不想顯示。, 這個外掛可以讓您在單獨的文章頁面上顯示或隱藏特色圖片,同時...。
  • WP-ShowHide 》預設情況下,內容是隱藏的,使用者必須點擊「顯示內容」連結來切換內容。與 Engadget 為他們的新聞稿所做的方式相似。範例用法:[showhide type="pressreleas...。
  • WP Mailto Links – Protect Email Addresses 》這個外掛可以安全地保護和編碼電子郵件地址,以防止垃圾郵件機器人、亂發郵件和其他機器人。此外,它很容易使用,不需要進行任何配置即可使用。, 功能, , 全...。
  • WP Hide Post 》這個外掛強在幫助你完全控制文章的顯示方式。在 WordPress 網誌上,一般加入的文章會顯示在首頁中,通常是第一篇位置,也會同樣顯示在分類、標籤、存檔頁面等...。
  • Hide Shipping Method For WooCommerce 》s offering “Free Shipping” and “Local Pickup” on the cart page. With the Hide Shipping Method for WooCommerce plugin, you can hide all other shippi...。
  • Hide Categories and Products for Woocommerce 》這個外掛可以讓你隱藏選定的類別上的店鋪產品,並隱藏類別本身,無論是在列表還是單獨頁面中。, 它可以與 Storefront(主題)短代碼兼容。, 使用方式, , 前往...。
  • Disable Media Pages 》這個 WordPress 外掛完全停用「附件」頁面。, 預設情況下,WordPress 會為每個附件建立一個頁面。這可能會有兩個不利因素:, 搜尋引擎優化, 附件頁面除了一張...。

文章
Filter
Apply Filters
Mastodon