Dynamic Content From CSV

Create and manage thousands of dynamic content versions directly from a CSV file.

  • Easily create and manage thousands of dynamic versions 
  • No page load delay! Not even if with thousands of versions

Why should I use Dynamic Content from CSV?

Creating dynamic content using an If-So trigger is super easy and useful. But if you’re applying thousands or even only dozens of dynamic versions, it can become time-consuming, and the page-load delay becomes noticeable.

If-So CSV is a new way to easily create and manage your dynamic content. It allows you to create and manage thousands of dynamic content versions directly from…well…a CSV file.

If-So CSV is flexible enough to suit any need and syncs with If-So.  Its functionality includes:

  • Compatibility with HTML as the CSV content
  • Can be used with page caching 
  • Displays content that can be used anywhere on your site or on your page templates

Which Conditions Can You Set with If-So CSV?

  1. Query-String (URL Parameter): Show content based on the value of a parameter
  2. Geolocation: Show dynamic content based on the country, state, or city name
  3. User Time zone
  4. Date/time
  5. Page URL
  6. Post ID
  7. User IP
  8. User Details (email / user name)
  9. Referral Source

If you want to show dynamic content based on other conditions, please check out our dynamic triggers.

How to set up the Dynamic Content from CSV?

A single CSV table of dynamic content is called a “Bulk”. The example below explains how to set a bulk with a query-string condition. The same principle applies to the rest of the conditions.

Step1: Create a CSV file with the following structure:

  1. Column A – the values of the condition. One value per row. The table below shows the required values for each condition.
Condition Values in column A Example
Query StringThe value of the query parameter – value only, without apostrophes.If the name of the parameter you had set when you created the trigger was “example”, and you’d like to display content when the page URL contains the query ?example=”value1″, then the value in column A should be value1
GeolocationThe value changes depending on the level (country, state, city, continent). Learn more.
Page URLThe Page URL, including the protocol (http:// or https:/), including www, and including / (slash) at the end of the URL.To display dynamic content on the current page, the value should be:
Post IDThe post ID (how to get the post ID)
User IPThe user IP
Date/ timeThe date and time according to the format selected when you create the bulk.
Cookie / Session Variable ValueCookie – the cookie value
Session – the session variable value.
User DataUsername – The username as it appears in the user profile.

Email – The user email as it appears in the user profile.
Referral SourceThe referral page URL, without http:// or https://, without www, and without a / (slash) at the end of the URL.

Default content – Default content is the content that will be displayed if the condition is not met. To set up a row of default content, select one of the rows and set column A with the value “default content”.

  1. Columns B: the dynamic content that will be displayed if the URL contains the parameter value (can be HTML if you want).
  2. Column C-F (optional): columns C-F are additional columns you can use to display dynamic versions in other places on your page.

After uploading the CSV to your site, you will receive unique shortcodes which correspond to the content of each column.

Download a template file

Step 2: Upload your CSV

  1. On your WP dashboard, go to If-So > Bulks
  2. Click “Add a new bulk”
  3. Name your Bulk (the name is for your reference only)
  4. Under “Condition Type”, select “Query String”
  5. Set your parameter (the parameter is the bolded part in the following example:  www.example.com?color=red).The parameter can be whatever you want, except for several WordPress reserved terms.
  6. Select your CSV separator – by default, the separator should be “Comma”. If your content contains commas you might want to set a different separator when you save your file. 
  7. Upload your file.
  8. Click “Create Bulk”.

Displaying your dynamic content

  1. The bulk you created on the previous step should now be shown on the If-So > Bulks page. Find it and click “View”.
  2. Copy the shortcode of the content (column) you want to display.
  3. Paste the shortcode anywhere on your website.


  • CSV Extension - number of characters that can be saved in a cell

    By default, the number of allowed characters in a single cell is 1,024.

    To change the max allowed number of characters in the relevant column:

    1. Add the code below to your functions.php file.
    2. Visit one of your website pages (it will run the code).
    3. Remove the code from your functions.php file.
    function modify_content_column(){
    global $wpdb;
    $wpdb->query("ALTER TABLE {$wpdb->prefix}ifso_bulks_content MODIFY COLUMN content VARCHAR(2048);");

    The code above will change the number of allowed characters to 2,048. You can replace the number in the code with any other number. Bear in mind that if your file consists of a considerable number of dynamic versions, there might be some loading speed implications (they will probably be insignificant, but it is worth checking).

  • Was this Helpful ?
  • YesNo
If-So CSV (Bulks)
Requirements: If-So Pro v1.5.4