Elementor Conditional CSS Classes: style without custom PHP.

Add a class to any widget when a visitor is logged in, on a phone, in a time window, or carrying a URL parameter. Display Conditions still hide elements — this lane only changes the class list.

  • Any widget or container
  • Device rules survive cache
  • Not Display Conditions

What you get

A class, not a hide.

Display Conditions remove the element. Conditional CSS Classes leave it in the HTML and add a class when the rule matches.

Login and role

is-logged-in or is-admin-user from the current WordPress session.

Device

mobile, tablet or desktop via matchMedia so a cached page can still switch.

Time and day

Site-timezone windows (09:00-17:00) and weekdays.

URL and cookie

Equals, contains or exists — sanitized query keys and cookie names.

WooCommerce

Has purchased a product, or cart is not empty, when WooCommerce is active.

Safe class names

Must start with a letter. javascript: and leading digits are rejected.

Live on this page

Two real rules.

These headings use the Advanced-tab repeater. Logged-in visitors get a highlight. Narrow viewports get a stacked style.

This heading adds the class is-logged-in when you have a WordPress session.

This heading adds mobile-stack below 768px (browser matchMedia).

How it works

Three steps.

Turn the lane on, open Advanced, add a class and a condition.

1

Turn the lane on

Settings → Add-on features → Platform: Conditional CSS Classes.

2

Open Advanced

Select any widget, section, column or container and open Conditional CSS Classes.

3

Add a rule

Type a class, pick a condition, save. Style the class in your theme or Custom CSS.

Ready to try it?

Conditional CSS Classes is part of LandTech Extras Premium. Use it when you want a style change, not a hidden element.