⚠️ These docs are only for the Adapter Legacy. If you are using the new App, you must refer to the University! ⚠️

Conditionals

The following attributes can be used on every element to show or hide it, based on specific conditions.

Show If

By using the attribute:

show-ifcondition

The element will be rendered only if the condition is met.

Hide if

By using the attribute:

hide-ifcondition

The element will not be rendered only if the condition is met.

Conditions

Below you will find all valid conditions, divided by sector, for brevity you will find all the attributes only with show-if, but you can change it with hide-if without any issue:

User

Show/Hide element if the user is currently logged in:

show-iflogged-in

Dynamic Box

Show/Hide element if the dynamic box is not empty:

show-ifdynamic-box

Rules Conditions

Rules are functionalities that allow to create specific conditions, manageable from the Udesly WP plugin.

Attribute is:

show-if:rulerule slug

ACF conditions

This is to hide/show an element if the ACF field is set.

Attribute is:

show-if:acfslug of the acf field

WooCommerce Conditions

Upsells

This is to hide/show an element if the current product has upsells:

show-if:wcupsells

This is to hide/show an element if the current product has related:

show-if:wcrelated
Rating

This is to hide/show an element if the current product has rating:

show-if:wcrating
In Stock

This is to hide/show an element if the current product is in stock:

show-if:wcin-stock
Backorder allowed:

This is to hide/show an element if for the current product the backorder feature is enabled, regardless of the presence or absence of a product in stock:

show-if:wcbackorder-allowed
On Backorder

This is to hide/show an element if the current product can be bought in backorder:

show-if:wcon-backorder

Notes

The elements you hide/show with conditionals will not be sent at all from the Server to the Browser, so they will not be "hidden" by css or js, they will not be present at all inside the DOM!