=== If-So Dynamic Content – Elementor & All Page Builders Personalization ===
Contributors: ifso
Donate link: https://www.if-so.com/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=donate
Tags: elementor conditions, geolocation, display conditions, A/B Testing, conditional logic
Requires at least: 5.6
Tested up to: 7.0.2
Stable tag: 1.10
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html


The ultimate solution for personalization, A/B testing, and geolocation — easy to use with Elementor, Gutenberg, and all page builders.

== Description ==

Looking for a simple yet powerful display conditions or visibility control solution (that actually works with page caching)?

**If-So** is the premier conditional logic and personalization plugin for WordPress. It lets you dynamically show, hide, or swap content based on who your visitor is, where they are located, and how they interact with your site. While generic visibility add-ons break under strict server caching or force you to exclude pages from your cache, If-So is built from the ground up to deliver fast, cache-immune marketing automation across all page builders.

[youtube https://www.youtube.com/watch?v=8kCPE1CH2GY]

=== 🚀 Key Features at a Glance ===
If-So is the most comprehensive geotargeting, personalization and conditional logic plugin for WordPress. It combines enterprise-level features with a simple, no-code setup:

*   **Simple Setup** - Configure and launch your first campaign in under 60 seconds. No coding.
*   **For All Page Builders** - Universal shortcode system brings dynamic functionality to any editor or theme setup.
*   **Elementor and Gutenberg Integration** - For quick element, widget, and block visibility control.
*   **360° Geolocation Solution** – Highly accurate IP-to-location, HTML5 geolocation, and visitor self-selection.
*   **Advanced Conditional Logic** - Unlimited visibility rules based on visitor data.
*   **WooCommerce Integration** - Target buyers by location, cart items, history, or total spend.
*   **Built-in Analytics & A/B Testing** - Track real-time views, measure conversions, and optimize.
*   **Behavioral Segmentation** - Assign visitors to dynamic audiences and deliver a cohesive, personalized journey across multiple pages.

=== 🌍 360° Geolocation – Straight Out of the Box ===
Deliver highly accurate localized experiences with absolutely no setup required. Enjoy **ultimate flexibility** in determining a visitor's location by combining premium IP-to-location mapping, a precise HTML5 geolocation API, and user self-selection forms.

*   **Show, Hide, or Swap Content:** Instantly personalize text, banners, images, or pricing fields for specific countries, cities, states, or continents.
*   **Geolocation Redirects:** Automatically route visitors to country-specific landing pages or localized subdomains.
*   **Geo-Blocking:** Restrict, lock, or grant access to specific elements or pages based on geographic regions.
*   **Geo Pop-ups:** Trigger lightweight, location-specific pop-up overlays tailored directly to local audiences.

**And more;** take your personalization further with advanced options like Dynamic Keyword Insertion (Geo DKI), auto-local time displays, timezone-based scheduling, and more. <a href="https://www.if-so.com/location-based-content-wordpress-plugin/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=geo-advanced" target="_blank">Discover all geolocation capabilities >></a>

=== 🛠️ Elite Visibility Control for All Page Builders ===
Compatible with **any page builder** and WordPress setup, If-So offers deep visual integration for top editors alongside a flexible shortcode system for everything else:

*   **Elementor Native** - Adds a dedicated "If-So Display Conditions" tab to every widget, section, column, or flexbox container.
*   **Gutenberg Native** - Set smart conditional visibility rules directly on core WordPress blocks.
*   **For All Page Builders** - Use dynamic triggers and shortcodes to easily apply conditional content inside Divi, Bricks, Breakdance, and more.


=== 🧪 Built-In A/B Testing & Conversion Analytics ===

Run split tests on any page element and measure exactly which version converts better — directly inside WordPress, no third-party tools required.

* **Test Anything** – Headlines, CTAs, images, entire sections, pop-ups, or any trigger-based content element.
* **Built-In Conversion Tracking** – Define your own conversion goals and measure results per version, right inside your dashboard.
* **Two Report Views** – Analyze results by conversion goal or by trigger, depending on what question you're trying to answer.
* **Cache-Compatible** – Tests run reliably even on fully cached sites, with no impact on page speed.
* **[Learn more about A/B Testing >>](https://www.if-so.com/ab-testing-wordpress/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=abt)**




== WHY MARKETING EXPERTS CHOOSE IF-SO ==

*   **100% Page Cache Immune:** Unlike generic visibility plugins that break when caching is enabled, If-So uses advanced page-load handling to ensure dynamic content renders perfectly alongside WP Rocket, LiteSpeed, Cloudflare, or server-level caching.
* **Built-In A/B Testing & Analytics:** Run split tests on any page element and track exactly which version converts — views, conversions, and conversion rate per version, right inside your WordPress dashboard. No Google Analytics setup required.
*   **Zero Complex Rules:** Create advanced multi-layered personalization loops in under 60 seconds without writing a single line of code.



== HOW IT WORKS ==

=== Using Elementor or Gutenberg ===
1. Select any widget, element, or block in your editor.
2. Open the **If-So Conditions panel** on the side menu.
3. Choose your condition (e.g., *Geolocation -> Country is United States*) and input the variation.

=== Using Any Other Page Builder ===
1. Go to the If-So dashboard and click **Add New Trigger**.
2. Select your target rules and enter the personalized version.
3. Define your default fallback content.
4. Copy the shortcode and place it anywhere on your layout.

== WHICH CONDITIONS CAN BE SET WITH IF-SO? ==

=== 🎯 Powerful Display Conditions & Personalization Rules ===
Choose from our massive library of native conditions to target your audience. You can combine multiple rules using smart conditional logic to build the ultimate personalized user experience.

**🌍 Geotargeting:**
*   **Country-level detection** – Target visitors by country.
*   **City-level precision** – Personalize down to specific cities.
*   **State & Region tracking** – Adapt content by state or province.
*   **Continent grouping** – Apply broad rules for entire continents.
*   **IP Address & Ranges** – Filter or target specific IP networks.

**📣 Traffic & Marketing:**
*   **UTM Parameters** – Target by Source, Medium, Campaign, and Content.
*   **Google Ads Campaigns** – Personalize dynamically via GCLID tracking.
*   **Referral Site URL** – Display content based on the originating site.
*   **Search Engine Referrers** – Adapt for Google, Bing, or Yahoo traffic.
*   **URL Query Strings** – Read custom parameters straight from the URL.

**👤 Visitor Behavior:**
*   **Logged-in Status** – Swap elements for members vs. public guests.
*   **WordPress User Roles** – Tailor views for Admins, Authors, or Customers.
*   **New vs. Returning** – Welcome fresh eyes or reward repeat visitors.
*   **Page View Frequency** – Trigger shifts based on site interaction history.
*   **Dynamic A/B Testing** – Set automated split percentage distribution.

**🕒 Time & Context:**
*   **Exact Date & Time** – Schedule time-sensitive sales or deadlines.
*   **Weekly Schedules** – Set recurring hours or daily specials.
*   **Local Time Zone** – Display schedules aligned with the visitor's clock.
*   **Current Page Path** – Set contextual triggers for specific sections.
*   **Custom Sessions** – Store temporary parameters during user visits.

**💻 Technology & Data:**
*   **Device Type** – Optimize explicitly for Mobile, Tablet, or Desktop.
*   **Browser & OS** – Target Chrome, Safari, iOS, Android, and more.
*   **Language Detection** – Read browser languages automatically.
*   **Cookies & Local Storage** – Hook into your own custom browser data.

**🔌 E-Commerce & Extensions:**
*   **Show/Hide Products by Location** – Restrict or display specific items based on regional availability.
*   **WooCommerce Cart Products** – Target specific items chosen by shoppers.
*   **WooCommerce Cart Value** – Upsell dynamically based on total cart value.
*   **WooCommerce Order History** – Identify and reward high-value lifetime buyers.
*   **Membership Tiers** – Native rules for MemberPress, Wishlist, and PMPro.
*   **Advanced Data Sync** – Seamlessly read fields from ACF, Forms, and LearnDash.

== 👤 Behavioral Audiences & User Segmentation ==

Don't just personalize a single element — build a cohesive user journey. If-So allows you to automatically assign visitors into predefined audiences based on their location, traffic source, or on-site interactions. Once grouped, you can deliver tailored content variations across multiple pages throughout their entire session. <a href="https://www.if-so.com/behavioral-segmentation-wordpress/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=audiences" target="_blank">Learn more about Audiences >></a>

=== 🚀 Powerful Extra Features ===
Discover the advanced tools that make If-So the ultimate conversion optimization suite for WordPress:

*   **Dynamic Keyword Insertion (DKI)** – Drop real-time values instantly into your text blocks. Display the visitor's city/country, capture UTM parameters, or show auto-localized event times using smart shortcodes. <a href="https://www.if-so.com/dynamic-keyword-insertion/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=dki" target="_blank">See DKI options >></a>
*   **User Self-Selection Forms** – Let visitors choose their own experience. Embed intuitive dropdown filter forms that allow users to select their own segment or target audience choice. <a href="https://www.if-so.com/user-selection-form/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=user-selection" target="_blank">Learn more >></a>
*   **Conditional Pop-ups** – Launch lightweight, high-converting overlays that trigger dynamically based on any chosen If-So targeting condition. <a href="https://www.if-so.com/conditional-popups/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=popups" target="_blank">Learn more >></a>
*   **Dynamic Content from CSV** – Scale your personalization effortlessly. Manage thousands of geo-targeted locations, regional details, or translation variables using a simple spreadsheet upload. <a href="https://www.if-so.com/csv-bulk-loading/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=csv" target="_blank">Learn more >></a>

== Installation ==

1. Go to your WordPress Control Panel.
2. Click "Plugins", then "Add New".
3. Enter "ifso" as the search term and click "Search Plugins".
4. Download and install the **If-So Dynamic Content** plugin.
5. Click the "Activate Plugin" link.
6. Find the "IfSo" tab on your WordPress admin menu and click "Add new" to start creating rules.

== Frequently Asked Questions ==

= How is If-So different from basic Elementor visibility add-ons? =
Most Elementor add-ons simply use CSS to hide elements, meaning the code still loads behind the scenes, and server-side caching will often display the wrong version to the wrong user. If-So uses an optimized rendering architecture that completely bypasses static page-cache limits while maintaining blazing-fast performance.

= How accurate is the Geolocation tracking? =
Extremely accurate. We use a premium, regularly updated IP-to-location database to ensure your visitors are correctly matched to their precise country, state, or city across global networks.

= Can I use If-So with any WordPress theme? =
Yes. If-So operates independently of your theme architecture. It works flawlessly across all standard-compliant WordPress themes and custom setups.


== Screenshots ==
1. Dynamic triggers - works with all page builder users
2. Dynamic Gutenberg Blocks
3. Dynamic Elementor Elements
4. The conditions
5. Built-in stats
6. Dynamic Keyword Insertion (DKI) shortcodes
7. Compatible with caching plugins
8. User segmentation
9. User-self selection field
10. The recurrence option
11. Dynamic trigger 

[ifso-audience type="add" audience="Male"]


== Changelog ==

= 1.10.0.1 =
* UI & Microcopy Improvements
* Bug Fixes

= 1.10 =
* **New: Built-In Analytics Dashboard** – Define custom conversion goals, track which trigger versions are driving results, and measure performance across all your A/B tests and personalization campaigns — directly inside WordPress, no third-party tools required. [Learn more](https://www.if-so.com/ab-testing-wordpress/analytics/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=analytics)
* **New: A/B Testing Analytics** – The analytics dashboard is built for A/B testing. Two report views let you analyze results by conversion goal or by trigger, with views, conversions, and conversion rate broken down per version. [Learn more about A/B Testing](https://www.if-so.com/ab-testing-wordpress/?utm_source=wordpress&utm_medium=readme&utm_campaign=v2&utm_content=abt)
* **New: Conversion Attribution Window** – Configure how long after seeing a trigger a conversion can still be attributed to it. Options range from single session to 1 year.
* Performance improvements and bug fixes.


= 1.9.8 =
* PHP 8.4 compatibility improvemnts.
* WordPress 7.0 compatibility fixes.


= 1.9.7 =
* Added a new shortcode - [ifso_hide_site_content] which allows you to display a message instead of the site's content.
* If-So GA4 Extension compatibility.
* UI improvements.
* Bug fixes and PHP 8.4 compatibility improvemnts.


= 1.9.6 =
* Added a new ifso_cookie_category filter that allows you to change the cookie consent category of cookies added by If-So. The filter receives two arguments: the cookie type (necessary, statistics, marketing, preferences) and the cookie name (<a href="https://www.if-so.com/faq-items/can-i-change-the-category-of-if-so-cookies/?utm_source=WordPress&utm_medium=Readme&utm_campaign=v2&utm_term=cookiefilter" target="_blank">Learn more</a>).

* Added a new DKI shortcode that lets you block users from accessing the site based on If-So conditions (for example, country-based blocking; <a href="https://www.if-so.com/geolocation-wordpress-plugin/wordpress-country-block/?utm_source=WordPress&utm_medium=Readme&utm_campaign=v2&utm_term=cookiefilter" target="_blank">Learn more</a>).

= 1.9.5.1 =

* Bug fixes (Built-in analytics UI)

= 1.9.5 =

* User IP condition - added a “starts with” operator
* Conditional Elementor and Gutenberg blocks - added Date & Time conditions
* Date & Time condition - can now operate using either the server timezone or the user’s local timezone (via geolocation)
* UI improvements on the trigger page
* [ifso-redirect] and [ifsoDKI type='url'] shortcodes - URL template now supports the {{?}} character, which renders a “?” when a query string exists and an empty string when it doesn’t
* Bug fixes and performance optimizations


= 1.9.4.1 =

* Resolved a non-critical security concern.

= 1.9.4 =

* New visual tool for generating If-So DKI and Utility shortcodes
* Shortcode improvements – [ifso-redirect] shortcode generator
* Reworked the A/B Testing condition for improved usability
* If-So Trigger Gutenberg block: added “Load with AJAX” option
* UI improvements
* Performance improvements
* Bug fixes

= 1.9.3.2 =

* Security fixes

= 1.9.3.1 =

* Google Places API compatibility fixes

= 1.9.3 =

* Compatibility with the <a href="https://wordpress.org/plugins/if-so-conditional-elementor-elements/" target="_blank">If-So & Elementor integration (version 1.4)</a>
* UI and microcopy improvements
* Bug fixes

= 1.9.2.2 =

* Compatibility with the upcoming If-So & Elementor integration (version 1.4)
* Fixed information disclosure vulnerability in the [ifso-show-post] shortcode
* UI and microcopy improvements
* Bug fixes


= 1.9.1 =

* Audience Standalone Condition – Added an option to target users who are either inside or outside any audience
* Updated the "Mobile Detect" library (the new version requires PHP 7.4 or higher)
* Bug Fixes



= 1.9 =

* PHP 5.X and lower versions are no longer supported.
* An old format of the DKI shortcodes has been removed. The new version no longer supports the following shortcodes (all of them have new alternatives):
[ifso_display_user_geo], [ifso_display_user_languages], [ifso_display_referrer]
* The [ifso-redirect] shortcode now defaults to the JS redirect type when rendered within an If-So trigger loaded via AJAX.
* A new filter, "ifso_gutenberg_standalone_widget_forbidden_blocks," has been introduced to prevent the If-So standalone condition widget from loading on certain Gutenberg blocks.
* Geo-session usage notifications are now calculated based on all licenses installed on the site, rather than separating pro and geolocation licenses.
* The "shortcodes in titles and menus" setting now affects WooCommerce page/category titles and breadcrumbs.
* The "time" DKI shortcode (Also known as the Auto-local Time Disaply shortcode) now supports displaying the current time according to the website's timezone using the format attribute (optional), for example: [ifsoDKI type='time' show='site-timezone' format='n/j/o, G:i'].
* Bug fixes
* Refactoring
* Performance improvments



= 1.8.0.4 =

* Licensing system improvements
* Bugs fix


= 1.8.0.3 =

* New DKI Shortcode: Automatically Creates Link Templates Based on the Page URLs. Commonly used to create a link to a parallel page on a different website.[ifsoDKI type='url' url='{{SCHEME}}://{{HOST}}{{PATH}}?{{QUERY}}']
* Security fix (XSS vulnerability)


= 1.8.0.2 =

* Bug fixes (Uncaught TypeError)

= 1.8.0.1 =

* Bug fixes (conditional gutenberg blocks)


= 1.8 =

* Added GA4 reporting option, which can be activated per-shortcode by adding a ga4="yes" attribute to the trigger's shortcode.
* Allowed names to be added to If-So trigger versions, which are also included in the GA4 events being sent (if enabled) as event parameters.
* Reworked the Gutenberg standalone condition widget for improved reliability and performance.
* Added a new public JS event - "ifsoajaxcontentloaded" - to help synchronize all the actions attached to various ajax content loading procedures.
* Allowed triggers rendered by "recurrence" and "testing mode" to work with analytics, groups, and other hooks.
* Allowed setting the_content filter on a trigger rendered via ajax (previously only without ajax) by setting the "the_content" attribute in the shortcode.
* UI improvements.
* Bug fixes.

 

= 1.7.1.1 =
 
* Security update.


= 1.7.1 =
 
* New functionality - Redirect shortcode improvements: Create a URL template to easily redirect each page on your site to a corresponding page on another domain, subdomain, TLD, or directory. <a href="https://www.if-so.com/help/documentation/redirect-users-based-on-conditions/" target="_blank">Learn more</a>.



= 1.7 =
 
* New functionality - Conversion can now be set to fire once every X seconds via the "do_once_per" shortcode attribute. <a href="https://www.if-so.com/help/documentation/analytics/" target="_blank">Learn more</a>.
* PHP 8.2 compatibility - Prevent the use of deprecated functionality.
* "Find a Trigger" tool functionality improvements.
* Elementor compatibility improvements - Treat Elementor "preview" pages like edit pages.
* Reworked the built-in analytics conversion system.
* Reworked the trigger hook/filter mechanism.
* Redirect shortcode - Escape URL before placing it on the page; changed "once_per" attribute to "do_onceper".
* ifsoDKI shortcode in "ajax" mode now works inside various pop-ups (If-So trigger events, Elementor, and others).
* Conditional Gutenberg Blocks functionality - Fixed dependency bug occurring in the newest version of WordPress.
* If-So triggers' shortcodes inside If-So bulks content now use the appropriate context when loaded via Ajax and vice versa.
* Gravity Forms compatibility fixes.
* Various bug fixes.

= 1.6.3.1 =


* WordPress 6.4 compatibility fixes



= 1.6.3 =


* Add support to use the <a href="https://wordpress.org/plugins/if-so-geolocation/" target="_blank">HTML5 Geolocation API (browser location) option</a>, provided by the free Geolocation Extension. <a href="https://www.if-so.com/the-html-geolocation-api/?utm_source=WordPress&utm_medium=Readme&utm_campaign=v2&utm_term=html5_api" target="_blank">Learn more</a>
* [ifso-add-cookie] Shortcode: Added 'increment' attribute. Setting it to 'yes' will make the cookie value a number that increments each time the shortcode is encountered. <a href="https://www.if-so.com/help/documentation/the-cookie-condition/" target="_blank">Learn more</a>.
* Cookie Condition: Added "Numeric is more than" / "Numeric is less than" options. 
* Redirect Shortcode: Added the ability to redirect once per a specified period of time. <a href="https://www.if-so.com/help/documentation/redirect-users-based-on-conditions/" target="_blank">Learn more</a>.
* "Find Shortcode" / Scan Posts Tool: Functionality improvements, including the ability to scan for relevant if-so conversions.
* Audiences and Geolocation Dashboard Pages: Enhancements.
* Bug Fixes.





= 1.6.2 =
* State targeting now utilizes the Google Maps API for state selection.
* Compatibility with new functions of the If-So Geolocation extension has been enhanced.
- Added the option to "block bots" (can be activated in the settings) (learn more).
- The geolocation request log and analyzer tool now include user-agent data, making it easier to detect and block bots. User agents can be blocked by passing an array of user-agent values to the filter "ifso_block_bots_extra_blocked_user_agents" (User-agent will be blocked if its text contains the value)
- Flag DKI Shortcode: Added a "classname" attribute, allowing users to add classes to the rendered element.
Ex. [ifsoDKI type='geo' show='flag' width='50px' classname='class-you-choose']
- Location override improvements: Added the option to display flags near the country labels in a selection form.
- Location override improvements: Country DKI shortcode is now affected by the override functionality.
- Location override page caching compatibility: The form can now be loaded using Ajax.
* Added the ability to whitelist users from the geolocation “Block bots” mode based on IP, cookie, or by using the geo service in the same way blacklisting is done, but with the "ifso_geo_whitelist" filter instead.
* Allow blocking users from the geolocation service based on the results of custom functions (user role, login status).
* UI improvements.
* Bug fixes.



= 1.6.1.2=
* Added the option to become a geolocation reseller - create sublicenses for clients' websites and take control of allocating monthly sessions to each sublicense based on their needs. <a href="https://www.if-so.com/add-ons-and-integrations/sub-geolocation-license/" target="_blank">Learn more.</a>.
* Improved the user interface of the geolocation dashboard section.
* Extended access to the audiences page and audience creation/deletion to editors, authors, and other custom roles with post creation permissions.
* Bug fixes.


= 1.6.1.1=
* Geolocation page - Various UI and style changes; added session usage chart to info tab
* Added new filter - "ifso_visit_count_expiration" - letting the user set the expiration of the "returning visitor" cookie
* Enabled if-so conversion shortcodes to work when loaded via ajax
* Bug fixes

= 1.6.1=
* Compatiblity with the new <a href="https://wordpress.org/plugins/if-so-geolocation/" target="_blank">If-So Geolocation Extension</a>.
* Log geo requests functionality removed - moved to geo extension. Note! If you enabled the log in the past, the old log will be deleted, you will have to download the <a href="https://wordpress.org/plugins/if-so-geolocation/" target="_blank">If-So Geolocation Extension</a> and re-check the 'Log Geolocation Request' in the plugin's settings to create a new log.
* Conditional Gutenberg blocks - streamlined the process of targeting locations for the Geolocation condition.
* Added ability to display the audiences a user is assigned to using the shortcode[ifso-audience type='show' show='user-audiences']
* Geolocation page UI changes.
* UI changes - the geolocation license activation field was moved to the license page.


= 1.6.0=
* New system to sync <a href="https://www.if-so.com/add-ons-and-integrations/" target="_blank">extensions and integrations</a>.
* Compatiblity improvements with new version of the conditional countdown extension
* [ifso-show-post] shortcode - added type='elementor' to improve rendering of elementor templates.
* Geolocation condition - "Curacao" was added to the list of countries
* UTM condition - added "term" type to the conditional Gutenberg and Elementor conditions.
* Bug fixes




== Upgrade Notice ==

