Cronblocks for WordPress

A couple of years ago I had an idea of a project targeting people who want to offer dynamic content on their sites but do not have the programming knowledge to do so. I called it Cronblocks ( – a system where the user can create snippets of content and choose when to display them. Not satisfied, I decided to add Geo-Location as a possible condition for displaying the snippets. It worked (and still works) fine for sites built in plain html or any programming language as the code is sourced via Javascript.

I recently decided to write a port of Cronblocks as a WordPress plugin as a proof of concept, with the following features:

  1. Snippets are a WordPress Custom Post Type
  2. They can (and should) be grouped into category-like taxonomies called Snippet Groups
  3. Set the snippet controls to use either Geo-Location (visitor’s country) or a Scheduled display time range and date (choose days of the week or days of months)
  4. Assign the Snippets to a Snippet Group (just like categories)
  5. Control overlapping Snippets in a Group with Priorities

To use it, place the Snippet Group shortcode to control where on your page/post you want the appropriate Snippet to be displayed, and that’s it!

The plugin will check for all snippets associated with the shortcode’s Snippet Group and will decide which one should be displayed according to the control settings for each Snippet. If more than one Snippet match the display conditions, a random one of the matching set will be selected.

As mentioned above, this is a proof of concept. I plan on writing a fully featured companion plugin that will offer the following:

  • Enable multiple control conditions of each type, and mix/match
  • Keep and show statistics of snippets being displayed
  • Optionally display snippets based on the visitor’s local time
  • Optionally reload the snippet group after a given amount of time (say a visitor is watching a video, reload the snippet group after 3 minutes)
  • Enable Region and City scope
  • Use Maxmind GeoIP2 database, which is more accurate than the GeoIP databased used in the Cronblocks plugin
  • Allow overriding of snippet options via the shortcode attributes
  • Set up roles that can access the snippet administration
  • Add an icon to the TinyMCE interface as a shortcut to inserting the shortcode
  • Add a Snippet Group Widget

While the fully featured one doesn’t come out, feel free to download the proof of concept from’s plugin repository: Download


Launching – Dynamic content for your website

Update: Want to use with WordPress? Check out the plugin!

It’s been a while since my last post, but it’s been for a good cause. This week I launched, an app that allows you to insert content on a web-page according to a given schedule or visitor’s geo-location.

Here’s how it works:

  1. Go to and click on Plans to sign up – there’s a free plan if you just want to see how it works. Check out the premium plans once you’re satisfied it’s what you need.
  2. After signing up, and activating your account (you’ll get an activation email), click on the Channels link. The Channels allow you to control where on your page you want the content to appear.
  3. Configure your channel to run by server (EDT) or client time – I recommend client time since you’ll probably be receiving people from across several different time zones.
  4. You can choose to copy the JS snippet at this time, or leave it for later – it’s the JS snippet that you’ll use on your website to show the content
  5. Once you have the channel set up, you can create your scheduled blocks for that channel. Blocks are the actual content that’ll show on your page. You can create as many schedules for a block as you want/need – either by months/days or by day-of-week. And you get to set the time you want them to show, too.
  6. If you have multiple blocks to show that overlap a given time slot, you can set them to have different priorities (weight). Higher weights trump lower ones. Think of it as stack, with heavier items being served first. Overlapping items with same weight will be picked randomly.

And that’s all there is to it. Your site will show whatever block is set up for that given timestamp.

What uses do you have for this? Well, for starters, you can segment your ads by time – sell your “prime time” for a higher price than other times (for those of you who don’t use ad networks). You can also include some JS in your block to make it refresh every 15 seconds or so. Basically, your imagination is the limit.

I’ll create new posts in the future with more examples. In the meantime, here’s a test block for you.