GP Layout Conditions by BWS
Adds Theme condition types to GB Pro so blocks can be hidden if a corresponding theme element is disabled via Layout or post-level settings.
by David Mitchell (Bridge Web Solutions) and Claude AI · github.com/davidofchatham/bws-generate-layout-conditions · website
★ 0stars
6release downloads
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/davidofchatham/bws-generate-layout-conditions/releases/download/v0.3.0/bws-generate-layout-conditions-0.3.0.zipFrom the readme
BWS GP Layout Conditions
WordPress plugin that adds GeneratePress layout-state condition types to GenerateBlocks Pro, so blocks inside a Block Element can be hidden when the corresponding theme element is disabled.
Problem A: Layout Element settings don't apply to Block Elements
The Disable Element configuration in a Layout Element doesn't apply to Block Elements that replace theme sections. Of course, you can match or mirror the Location inclusion/exclusion settings between Layout and Block Elements, but if you want to toggle multiple elements in one place, rather than in every site-wide Block Element, you're out of luck.
This plugin tries to detect all the applicable settings from both Layout Elements and post settings at render time, and offers two ways to use them:
Workaround 1: GB Conditions
The plugin adds two new GenerateBlocks Pro condition types you can add to a block within a Block Element:
- Theme Element Status (gpthemeelement) — 8 rules: one per element state, plus one for GeneratePress' own featured-image slot.
- Theme Sidebar (gpthemesidebar) — 3 rules for the resolved sidebar layout.
Nothing is hidden automatically; you must configure the conditions yourself
Read the full README on GitHub →