| 开发者 | dudaster |
|---|---|
| 更新时间 | 2026年5月7日 02:49 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
user_role, is_logged_in, user_id, post_type, post_status, post_age_days, post_word_count, post_has_thumbnail, cart_count, cart_total, current_hour, current_day, current_month, current_year, utm_source, utm_medium, utm_campaign, utm_content, utm_term, and more.
Condition types:
eleconditions_vars filter in your theme's functions.php.
ACF support — pick any ACF field from a searchable dropdown; the value is fetched at render time.
User meta — condition on any WordPress user meta key for the current visitor.
Debug mode — shows a red-bordered overlay with the evaluated variable values, visible only to editors and administrators.
Developer-friendly
Open any widget or section in Elementor, go to the Advanced tab, and scroll to the Triggers section.
Same Advanced tab, scroll to the Ele Conditions section — just above Triggers.
Yes. Enter a CSS selector in the Target field (e.g. .my-popup or #hero-button). Leave it empty to target the element itself.
On first page load the visitor is randomly assigned to group A or B. That assignment is saved in localStorage and stays consistent across sessions. Use A/B Group A and A/B Group B triggers on different elements to show different content to each group.
Add a filter in your theme's functions.php:
add_filter( 'eleconditions_vars', function( $vars ) { $vars['my_var'] = 'some_value'; return $vars; } );
Then select Custom in the variable dropdown and type my_var.
Yes — triggers and conditions work on widgets, sections, and containers.
Display conditions are evaluated server-side at render time — no JavaScript needed for them. The triggers script (triggers.js) is a single lightweight IIFE loaded in the footer only when needed.