je-dynamic-visibility-condition

Register custom JetEngine Dynamic Visibility conditions via the conditions/register hook.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/vikingokft/wp-agent-skills --skill je-dynamic-visibility-condition
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: je-dynamic-visibility-condition
Source: https://github.com/vikingokft/wp-agent-skills/tree/main/jet-engine/je-dynamic-visibility-condition
Command: npx skills add https://github.com/vikingokft/wp-agent-skills --skill je-dynamic-visibility-condition

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of extending JetEngine Dynamic Visibility with custom condition logic that works consistently across editor UI and rendering contexts.

Core Features & Use Cases

  • JetEngine Dynamic Visibility extension contract: Registers a custom condition by hooking jet-engine/modules/dynamic-visibility/conditions/register and providing a class that extends \Jet_Engine\Modules\Dynamic_Visibility\Conditions\Base.
  • Correct show/hide semantics: Ensures check() returns the proper boolean based on the user’s intent in $args['type'] ('show' vs 'hide') so the UI behaves as expected.
  • Context-aware value resolution: Uses get_current_value($args) to read WP_Post/WP_User/WP_Term/WP_Comment and listing macros correctly instead of relying on raw meta reads.
  • UI behavior controls: Guides proper configuration of get_id(), get_name(), get_group(), is_for_fields(), need_value_detect(), need_type_detect(), and get_custom_controls() so the condition appears in the right place in the dropdown and shows the right inputs.

Quick Start

Tell the AI: create a JetEngine Dynamic Visibility custom condition class extending \Jet_Engine\Modules\Dynamic_Visibility\Conditions\Base, implement get_id()/get_name()/check() with correct $args['type'] inversion and use get_current_value($args) for listing-aware meta, then register it on jet-engine/modules/dynamic-visibility/conditions/register from your companion plugin.

Frequently Asked Questions about je-dynamic-visibility-condition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a custom dynamic visibility condition to JetEngine?▼

To add a custom JetEngine dynamic visibility condition, hook `jet-engine/modules/dynamic-visibility/conditions/register` and extend `\Jet_Engine\Modules\Dynamic_Visibility\Conditions\Base`, implementing `get_id()`, `get_name()`, and `check()`.

Why does my JetEngine custom visibility condition show the wrong result in listings?▼

JetEngine visibility conditions fail when relying on raw meta reads. You must use `get_current_value($args)` to properly resolve context-aware `WP_Post`, `WP_User`, or `current_listing` macros during widget rendering.

How do I configure UI inputs for a JetEngine visibility condition?▼

Configure UI inputs for a JetEngine visibility condition by setting `is_for_fields()`, `need_value_detect()`, and `need_type_detect()` flags, and implementing `get_custom_controls()` to display the correct fields in the editor dropdown.

Can I use custom PHP logic to show or hide WordPress widgets based on post meta?▼

Yes, you can show or hide WordPress widgets via custom PHP logic by building a companion plugin for JetEngine 3.x that registers a custom condition class and evaluates the logic inside the `check()` method.

Does a JetEngine dynamic visibility condition need to handle show and hide logic differently?▼

Yes, the `check()` method must read the user's intent from `$args['type']` and invert the boolean return value accordingly, ensuring the `show` and `hide` semantics behave as expected during widget rendering.