The Daily Blank Theme can be… less than Daily

Not everyone is up to running a daily _________ kind of site (like the original DS106 Daily Create). It’s a tough pace! So now you can make it Every Other Day or heck, even Weekly.

This was out of my own need, there you go. I’m running two of these sites now, a Daily Digital Alchemy for the Networked Narratives class and a [Was] Daily Extend for the Ontario Extend project.

For a few months, the Extend was on pause, as we were working on preparing for the current version of the program as a medium sized Open Online Course running inside edX (that’s another story).

For the mOOC we started Completely Inside, so we re-named them “Small Stretches” and asked people to post their responses in a forum area. From the feedback, a few felt like daily was a bit too many, so we have been doing 3 per week, Monday, Wednesday, and Friday (weekends off!).

But we do have a semi-secret strategy in the mOOC to slowly pry it open, and give participants each week something to do Outside the MOOC. Without any fanfare, on February 11 we just started publishing the same activities in the Extend site. Then we had a “reveal” this week, and we offer participants both methods for taking on the optional extra creative challenges.

All of this was a way of saying, I needed a way to adjust the code to allow for a less than daily pace for publishing (these are set up in the WordPress theme as scheduled posts, previously always set for 24 hours after the last published one).

The theme now has a new admin option to set a pace of scheduling.

New theme option to allow scheduling at different paces (hidden is a every 2 weeks option).

Things inside are dependent on a function when a new “daily” is added, first to find the date of the last published one- this is either the one most far out in the scheduled queue, or if there are no ones, find the date of of the most recently published one.

function dailyblank_get_last_date() {
	// Used to get the date of the last scheduled daily blank
	// we will query to get all future dated posts
	$args = array( 'numberposts' => 1, 'post_status'=> 'future' );
	$lastposts = get_posts( $args );
	if ( count($lastposts) ) {
		// simple loop to get the post_date for the last scheduled post
		// and return that date
		foreach( $lastposts as $post ) {
			return  ( $post->post_date );
	} else {
		//  no scheduled posts, look for most recent published post that has a post meta used by daily blanks
		$args = array( 'numberposts' => 1, 'post_status'=> 'publish', 'meta_key' => 'dailyblank_tag' );
		$lastposts = get_posts( $args );
		if ( count( $lastposts ) ) {
			foreach( $lastposts as $post ) {
				setup_postdata( $post );
				return ( $post->post_date );
		} else {
			// return today's date at the designated time of day (stored as option like "05:00" for 5am)
			return ( strtotime('today+' . dailyblank_option('dailytime')  ) );

We first get a time stamp value for the last published/scheduled item using the function above.

// get unix time for last published  daily blank
$last_dailyblank_date = strtotime( dailyblank_get_last_date() );

Then, we need to do some math to figure out the interval to place before scheduling the current post. Before this, it was just a fixed 24 hours, but now we need to factor in the new option (stored as values of days).

// first do offset  (every X days)
$daily_offset = 3600 * 24 * dailyblank_option('frequency');

And now we set the correct date to schedule; first check whether we are out currently in an time less than the desired frequency of publishing, so we just push it out from today + the offset. Otherwise, we push the scheduled date that much after the last scheduled one. It looks complex, but, well heck, it makes sense to me.

/* if it's been more than 24 hours since the last published daily blank, 
	   set the next date to be on the  day after current; otherwise, set the 
	   next one to be 24 hours after the last published one.
	   Factor in offset for less frequent than daily
	$next_dailyblank_date = ( ( time() - $last_dailyblank_date ) > 3600*24* dailyblank_option('frequency')) ? strtotime('today+' . dailyblank_option('dailytime') ) + $daily_offset :  $last_dailyblank_date + $daily_offset;

Of course, as a site manager, you can always go in an manually change the scheduled time for an item.

All of this to say is now you can run a site that pops a new one out every 3 days, every week, every 2 weeks… I guess I could make it once a century if you really need a slower pace.

All of this is now available in the updated version of the theme at I don’t think anyone other than me even bothers with setting up these sites, but it’s there is you are also out here on the far reaches of the bell shaped curve.

I think these are fantastic activities to roll into any class or project (which is why I seem to keep making new versions). This new feature just offers a bit more flexibility. Previous changes have set it up to put a site in a pause mode, if you are taking a break (so you are not hitting the twitter API once an hour looking for updates). And one of the best things I added, by request of Mariana Funes for her Daily Stillness site, is a quick way to “recycle” an existing daily into a new one.

And I can’t help but be proud to see the original DS106 Daily Create still going, at number 2605, I think being queued up by current course leaders Paul Bond and Bill Genereux (and maybe, I am not sure, some student workers at UMW?). That site has not stopped publishing daily since January 2012- a 6+ year run, which in this days of come and go web sites, Google slash and burning their own sites, is a good long marathon.

Do it Daily, or less than daily!

Featured Image: Pixabay image by geralt shared under a [WTF is] a Pixabay license

Privacy Statement