“Who ya gonna call?” “CODEBUSTERS”

No.

But the metaphor of Ghostbusters crossing the streams was inversely appropriate to a little bit of code action over the holidays (of which the actual action was nil).

But this was fun.

This nice tweet from John Johnston (who spawned the idea) reminded me of a WordPress plugin I had made

The WP Posted Today plugin is meant to offer a short code you can put on a site and it will list all previous posts on the current calendar day (this of course is useful if you actually still blog regularly) (cough) (cough).

Just for grins I checked the page where I use my own plugin. Yikes. Red Alert. It displayed all the ones for December 29 in years past, but the part where it should list how many there were was blank.

Red arrow points to missing number where the page output reads "There are posts previously published on December 29th"

I dug into my own code… and found myself a bit lost. Crossed. I was not even sure where I got the sprintf functions (John’s original code?) that were aimed to be compatible if anyone every wanted a language translation (maybe, or it’s just that thing when people code things differently).

Taking the path of least resistance, I took out the code where I think the problem was occurring and did it a more simple, but brute force way.

And it worked.

So I updated the version on GitHub and felt at peace with the world. In the off chance someone stumbled into my little corner of code, they would find something that works (or should work).

And then (here comes a stream crossing) Michael Hanscom @djwudi — someone I don’t think I’ve ever communicated with — tweets that he had seen pretty much the same bug and offered a fix.

https://twitter.com/djwudi/status/1212871226953101313

In looking at his post I saw the fix he made, and said– that’s better than mine! So I decided today to roll back my changes in place of Michael’s solution (but also keeping a modification I had made to remove extraneous calls when not needed for singular versus multiple results).

I noted the extra change he made in hos own version

Plus, I’ve made one other tweak to the plugin, so that it adds a link to the end of the excerpt to better handle “microblog” style entries that don’t have titles, so I still get to feel good about that part, as well. 🙂 My coding skills may be underdeveloped and rusty from lack of regular use, but they’re not entirely atrophied!

In this case, these microblog type entries (see Michael’s demo page) lack titles, so yes, a link is needed at the end of the post excerpt.

Yet I could see that regular posts (like on my site) did not need the extra link, and also, not everyone might want the arrow Michael likes.

I solved this cleverly by creating an additional shortcode parameter more which defaults to a blank string. In the shortcode function, we convert any attributes passed to variables with

extract(shortcode_atts( array( "month" => '', "day" => '', 'excerpt' => 1, 'more' => '' ), $atts ));

So on my site, where I just used the shortcode

There are 17 posts previously published on October 11th

  • 2024
    • Wow Us with your AI Generated Podcast… Countless are the posts of people showing off the “coolest” AI thing, using Google’s NotebookLLM to generate a chatty podcast of your uploaded book, blog post, paper, shopping list. Woah. Wow. You click and listen hearing a male and female voice banter back and forth in conversational tone. Neato, you are so onto this AI […]
  • 2021
  • 2016
    • I <3 DML It has been a really, really, really long time since I have been so excited, almost giddy, about a conference experience. Maybe going back to the first Open Education ones, or better yet, to the Northern Voice conferences 10 years ago. Perhaps I wrote conferences off, but last week’s Digital Media and Learning conference held […]
  • 2015
    • Facebook as Catfish Paradise: Its Community Standards Wears the Cone of Shame Just to prove that nothing blogged here is written chiseled in granite, with great shame I admit unpulling the fork I put in my facebook account in 2014. I am present with the most minimal timeline, and it is solely so I can communicate with students in Project Community. That said, I am feeling the […]
  • 2014
    • 2014 Kiwi Tour: Up North to Northtec creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Each day so far this week has required a one hour earlier wakeup time. I shall protest (politely) this trend (just kidding, Richard!). Today back to 5:30 because of the 2 hour drive from Auckland to Northtec in Whangarei (that’s “Wh” as in “F”). […]
    • 2014 Kiwi Tour: Round 1 of 2 at AUT creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Tuesday brought a glorious blue sky day to go into Auckland again, today to do sessions at Auckland University of Technology. My contact/host today was Thom Cochrane, who like Claire Donald yesterday, I first got to know in my 2004 visit to UNITEC (my […]
  • 2013
    • The 49th State of ds106: Case Files I knew I would have use for this photo I took Tuesday on the road to [closed, thank you very much Congress] Denali National Park. I have been so excited for this trip made possible by an invitation from Chris Lott, the “big show” being a keynote yesterday for the University of Alaska Fairbanks TechFest. […]
  • 2012
    • Never Miss a Daily Create Again cc licensed ( BY NC ) flickr photo shared by wilmesmom People (like me) can get upset when the ds106 server goes down, and here is another tip to help you to keep tabs on the Daily Create, so you can know the assignment even if the server is belly up and gagging. At first […]
    • Harp Tripper cc licensed ( BY ) flickr photo shared by cogdogblog I’ve stilled not gotten very far in learning how to play my harmonica. Maybe, it is like learning… you don’t get far without putting any effort into it. But I can still have fun making noise. Tonight I have about 5 gazillion things to do, […]
  • 2011
    • 106 Photos cc licensed ( BY ) flickr photo shared by cogdogblog Ever since ds106 started, I’ve had this rabid obsession for photos with a 106 represented, starting December 18, 2010 (a month before the first open class launched), when I saw a pole along a canal in Mesa Arizona. This is the Illustrate 106 assignment It […]
    • Take a Friendly Trip Down the River Take a fine trip down south, maybe just a wee bit of adventure. Meet our local friendly folks who just want to say “hi”. You will squeal with excitement. This is a minimalist travel poster assignment for ds106, though not quite minimal in graphic design, maybe concept?. In photoshop I use the Cutout filter to […]
  • 2009
    • M-m-m-my/Your Generation & Clever Words At the Root With all I love about expression in digital media, all of tis forms, I’ve never found the way to formulate what’s bubbled as a thought– that at the root of the best stuff is really, simple good writing, the clever use of words, shades of meaning, etc. Yep, plain old text. I was reminded of […]
  • 2008
    • Connectivism Shop? The Future is Here? by cogdogblog posted 24 Sep ’08, 7.11pm MDT PST on flickr Spotted on the streets of Hong Kong, I am pretty sure in peeking in the window I saw lots of “Connectivism in a Box” 😉 Go George Go!  Share this barking on social media
    • Oh To Be WordCamp(ed) in DC Just got word via the tweetvine from Dave Lester that the first ever WordCamp Ed (WordCamp Education) is happening in Washington, DC, on November 22 at George Mason University. WordCamp Ed is a WordCamp focused entirely on educational uses WordPress “” in schools and universities. The inaugural WordCamp Ed will be held at George Mason […]
  • 2005
    • Dusting Off Crusty Old Software Yesterday, a phone call cam and was like one of those cans of compressed air designed to blow the cobwebs off my neurons. Someone teaching psychology at a school located in the middle of the US was interested in a multimedia project dating back to 1997 (and that was when it was completed). Negative Reinforcement […]
    • Hypnotic Bookmarking As the tawdry saying goes… “I Like to watch” It’s not what your dirty minds think… I was one of more than 100 people watching LiveMarks, a near real time window of the input to the social bookmarking pile called del.icio.us: LiveMarks is a project to show del.icio.us bookmarks live. On the left of LiveMarks […]
  • 2004
    • flickr object flickr foto Volcano Types Diagramavailable on my flickr Volcanos are often classified by plotting their degree of “explosiveness” (y axis) and height of the erpution column (x axis)…. the largest and most dangerous eruptions have high values of both. Roll over each type for examples. Note- this example is here is purely for showing how […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 17 posts previously published on October 11th

  • 2024
    • Wow Us with your AI Generated Podcast… Countless are the posts of people showing off the “coolest” AI thing, using Google’s NotebookLLM to generate a chatty podcast of your uploaded book, blog post, paper, shopping list. Woah. Wow. You click and listen hearing a male and female voice banter back and forth in conversational tone. Neato, you are so onto this AI […] &amp#x27A1;
  • 2021
  • 2016
    • I <3 DML It has been a really, really, really long time since I have been so excited, almost giddy, about a conference experience. Maybe going back to the first Open Education ones, or better yet, to the Northern Voice conferences 10 years ago. Perhaps I wrote conferences off, but last week’s Digital Media and Learning conference held […] &amp#x27A1;
  • 2015
  • 2014
    • 2014 Kiwi Tour: Up North to Northtec creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Each day so far this week has required a one hour earlier wakeup time. I shall protest (politely) this trend (just kidding, Richard!). Today back to 5:30 because of the 2 hour drive from Auckland to Northtec in Whangarei (that’s “Wh” as in “F”). […] &amp#x27A1;
    • 2014 Kiwi Tour: Round 1 of 2 at AUT creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Tuesday brought a glorious blue sky day to go into Auckland again, today to do sessions at Auckland University of Technology. My contact/host today was Thom Cochrane, who like Claire Donald yesterday, I first got to know in my 2004 visit to UNITEC (my […] &amp#x27A1;
  • 2013
    • The 49th State of ds106: Case Files I knew I would have use for this photo I took Tuesday on the road to [closed, thank you very much Congress] Denali National Park. I have been so excited for this trip made possible by an invitation from Chris Lott, the “big show” being a keynote yesterday for the University of Alaska Fairbanks TechFest. […] &amp#x27A1;
  • 2012
    • Never Miss a Daily Create Again cc licensed ( BY NC ) flickr photo shared by wilmesmom People (like me) can get upset when the ds106 server goes down, and here is another tip to help you to keep tabs on the Daily Create, so you can know the assignment even if the server is belly up and gagging. At first […] &amp#x27A1;
    • Harp Tripper cc licensed ( BY ) flickr photo shared by cogdogblog I’ve stilled not gotten very far in learning how to play my harmonica. Maybe, it is like learning… you don’t get far without putting any effort into it. But I can still have fun making noise. Tonight I have about 5 gazillion things to do, […] &amp#x27A1;
  • 2011
    • 106 Photos cc licensed ( BY ) flickr photo shared by cogdogblog Ever since ds106 started, I’ve had this rabid obsession for photos with a 106 represented, starting December 18, 2010 (a month before the first open class launched), when I saw a pole along a canal in Mesa Arizona. This is the Illustrate 106 assignment It […] &amp#x27A1;
    • Take a Friendly Trip Down the River Take a fine trip down south, maybe just a wee bit of adventure. Meet our local friendly folks who just want to say “hi”. You will squeal with excitement. This is a minimalist travel poster assignment for ds106, though not quite minimal in graphic design, maybe concept?. In photoshop I use the Cutout filter to […] &amp#x27A1;
  • 2009
    • M-m-m-my/Your Generation & Clever Words At the Root With all I love about expression in digital media, all of tis forms, I’ve never found the way to formulate what’s bubbled as a thought– that at the root of the best stuff is really, simple good writing, the clever use of words, shades of meaning, etc. Yep, plain old text. I was reminded of […] &amp#x27A1;
  • 2008
    • Connectivism Shop? The Future is Here? by cogdogblog posted 24 Sep ’08, 7.11pm MDT PST on flickr Spotted on the streets of Hong Kong, I am pretty sure in peeking in the window I saw lots of “Connectivism in a Box” 😉 Go George Go!  Share this barking on social media &amp#x27A1;
    • Oh To Be WordCamp(ed) in DC Just got word via the tweetvine from Dave Lester that the first ever WordCamp Ed (WordCamp Education) is happening in Washington, DC, on November 22 at George Mason University. WordCamp Ed is a WordCamp focused entirely on educational uses WordPress “” in schools and universities. The inaugural WordCamp Ed will be held at George Mason […] &amp#x27A1;
  • 2005
    • Dusting Off Crusty Old Software Yesterday, a phone call cam and was like one of those cans of compressed air designed to blow the cobwebs off my neurons. Someone teaching psychology at a school located in the middle of the US was interested in a multimedia project dating back to 1997 (and that was when it was completed). Negative Reinforcement […] &amp#x27A1;
    • Hypnotic Bookmarking As the tawdry saying goes… “I Like to watch” It’s not what your dirty minds think… I was one of more than 100 people watching LiveMarks, a near real time window of the input to the social bookmarking pile called del.icio.us: LiveMarks is a project to show del.icio.us bookmarks live. On the left of LiveMarks […] &amp#x27A1;
  • 2004
    • flickr object flickr foto Volcano Types Diagramavailable on my flickr Volcanos are often classified by plotting their degree of “explosiveness” (y axis) and height of the erpution column (x axis)…. the largest and most dangerous eruptions have high values of both. Roll over each type for examples. Note- this example is here is purely for showing how […] &amp#x27A1;
to get the arrow codes he likes. This works because output for each found post looks like

// output post and link
			
$output .= '
  • ' . get_the_title() . ''; // display excerpt if we want it if ( $excerpt ) $output .= ' ' . get_the_excerpt(); // for microblog output where there might not be titles so add a link at end // h/t https://www.michaelhanscom.com/eclecticism/2020/01/02/rss-feed-weirdness-and-php-debugging/ $output .= ' ' . $more . '
  • ';

    So how is that for the odds of streams crossing on the same obscure bit of code? That’s the old fashioned kind of net serendipity that still happens.

    Thanks Michael! Check out his 20 year old blog, he’s an “Enthusiastically Ambiverted Hopepunk” quite the tag line.


    Featured Image: Edit of the Ghostbusters Cross Streams scene found in the Ghostbusters Fandom Wiki site which states “Community content is available under CC-BY-SA unless otherwise noted.” I replaced part of the background with a screenshot of the WP Posted Today PHP code.

    Profile Picture for CogDog The Blog
    An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

    Leave a Reply

    Your email address will not be published. Required fields are marked *