“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 14 posts previously published on August 24th

  • 2025
    • Jump the Paywalls and Help Others Over the Top A typical scroll trip through almost any social media stream. People share a link to something from the New York Times. Clunk. Another from the Washington Post. Thud. MIT Technology Review? Splat. Almost anything resembing a newspaper? Clank. Sure you might get one free read a month, but with every annoying frequency, reading most sources […]
  • 2021
    • Backdoor for WordPress Block Editor Lack for Audio Playlists The [WordPress] world has enough hate dislike for the Block Editor (ask Tony Hirst). I like it better when a work around works. In my OE Global work I’ve been working on a podcast series, and saw a need to generate audio playlists for different groups of episodes. I remember doing playlists in raw HTML, […]
  • 2015
    • WordPress Page Redirector tl;dr I’ll be *****ed if I will use such a cliché. This post is a bit techy, and is mainly for WordPress tinkerers, aimed to help explain something in an email I am sending Tom. But hey, you never can know if someone else is trying to do something like this. Hopefully you can know […]
  • 2013
    • Shiny Happy Computer People Don’t all those people look so happy using their computers? Smiles, working together, so perfectly diverse. They all seem to own Apple laptops. Shiny. Happy. Well except for one guy in the middle. Last week while trying to deal with a problem in my health insurance, I had to create an account on their site. […]
  • 2012
    • This Dog is Your Teacher This video is really meant as an introduction to students in my online section of ds106 at University of Mary Washington; I agree its critical early on to help create a sense of identity for all participants in the class. While this class is online, all of my students are there in Fredericksburg… but I […]
  • 2011
    • ds106 radiocasts from Windsor and Hamilton Big wheels keep on rolling, and the leg of travel through the more populated parts of Ontario produced two more nights in a row of meeting people and bringing them kicking and screaming into ds106 radio (just kidding, no kicking, no screaming, they ask). On Monday I drove to the part of Canada that is […]
  • 2010
    • What’s Your Story on Daily Photo Projects? cc licensed flickr photo shared by Jase The Bass I have an addiction. It involves…. cameras. Since 2008, I’ve been in a flickr group of people sharing daily photos; we are now at 500. No one is in charge, no one makes rules. I’ve also been participating in the dailyshoot version since November 2009. I […]
  • 2008
    • NGTD and ReaderBox Zero I almost started to say something like “I Can’t” but I can’t do that. But I honestly know that organizational stuff (like keeping things neatly in file and making to do lists) are just practices I don’t gravitate to. The inane tweet above was more a mis-placed assumption that the GTD “movement” seems to end […]
  • 2007
    • Smell The Bacn You know about email spam. You cannot avoid it, you cannot Can it, you cannot toss it though it is passed the expiration date, and you cannot even make a decent sandwich with it. But you know what this is, blog readers? That is my breakfast, yum, it is “Bacn”! Yes, the new hot meme […]
  • 2005
    • Conversations: Tree People and Cave Dwellers It’s been interesting to see how a dis-connected set of blog posts about “distributed conversations” have pretty much emulated the topic. Mine was but one tiny ripple among the tide. With a few iterations of search (lacking an explanation of their syntax), Technorati does a credible job, but is it all the echoes? Just recently, […]
    • On Tiger Previously I described my usual reluctance to be first out of the gate to do an operating system update, so until this afternoon I was still running Jaguar / Mac OSX 10.3. To be honest and repetitive, an operating system is really not something I like to focus on- a good OS should be as […]
    • Shoot ‘Em Up Talk Show Imagine this- a full immersive 3D world where people from remote locations can share and collaborate ideas… and they can blow each other up. I am not a vidoe gamer but can very much appreciate the novelty, originality, and sheer sarcastic fun of This Spartan Life, or how it is billed, “A Talk Show in […]
    • My Favorite Radio Station is 89.7 I am now grooving to the tunes of the station at the bottom of the FM dial – thanks to the arrival yesterday of my new DLO TransPod. As advertised, it is simple to set up and use, and now in my truck I am listening to the tunes and talks from my iPod Shuffle […]
  • 2004
    • RSS Feeds for Maricopa ePortfolio Today I cleaned my desk of paper piles, revamped the “todo” list that overflows from my whiteboard, and finished up a little experiment I had started on our ePortfolio site. Audree Thurman, the clever programmer of this nifty system, had developed a nifty approach for RSS feeds. There is a web page version (human readable) […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 14 posts previously published on August 24th

  • 2025
    • Jump the Paywalls and Help Others Over the Top A typical scroll trip through almost any social media stream. People share a link to something from the New York Times. Clunk. Another from the Washington Post. Thud. MIT Technology Review? Splat. Almost anything resembing a newspaper? Clank. Sure you might get one free read a month, but with every annoying frequency, reading most sources […] &amp#x27A1;
  • 2021
    • Backdoor for WordPress Block Editor Lack for Audio Playlists The [WordPress] world has enough hate dislike for the Block Editor (ask Tony Hirst). I like it better when a work around works. In my OE Global work I’ve been working on a podcast series, and saw a need to generate audio playlists for different groups of episodes. I remember doing playlists in raw HTML, […] &amp#x27A1;
  • 2015
    • WordPress Page Redirector tl;dr I’ll be *****ed if I will use such a cliché. This post is a bit techy, and is mainly for WordPress tinkerers, aimed to help explain something in an email I am sending Tom. But hey, you never can know if someone else is trying to do something like this. Hopefully you can know […] &amp#x27A1;
  • 2013
    • Shiny Happy Computer People Don’t all those people look so happy using their computers? Smiles, working together, so perfectly diverse. They all seem to own Apple laptops. Shiny. Happy. Well except for one guy in the middle. Last week while trying to deal with a problem in my health insurance, I had to create an account on their site. […] &amp#x27A1;
  • 2012
    • This Dog is Your Teacher This video is really meant as an introduction to students in my online section of ds106 at University of Mary Washington; I agree its critical early on to help create a sense of identity for all participants in the class. While this class is online, all of my students are there in Fredericksburg… but I […] &amp#x27A1;
  • 2011
    • ds106 radiocasts from Windsor and Hamilton Big wheels keep on rolling, and the leg of travel through the more populated parts of Ontario produced two more nights in a row of meeting people and bringing them kicking and screaming into ds106 radio (just kidding, no kicking, no screaming, they ask). On Monday I drove to the part of Canada that is […] &amp#x27A1;
  • 2010
    • What’s Your Story on Daily Photo Projects? cc licensed flickr photo shared by Jase The Bass I have an addiction. It involves…. cameras. Since 2008, I’ve been in a flickr group of people sharing daily photos; we are now at 500. No one is in charge, no one makes rules. I’ve also been participating in the dailyshoot version since November 2009. I […] &amp#x27A1;
  • 2008
    • NGTD and ReaderBox Zero I almost started to say something like “I Can’t” but I can’t do that. But I honestly know that organizational stuff (like keeping things neatly in file and making to do lists) are just practices I don’t gravitate to. The inane tweet above was more a mis-placed assumption that the GTD “movement” seems to end […] &amp#x27A1;
  • 2007
    • Smell The Bacn You know about email spam. You cannot avoid it, you cannot Can it, you cannot toss it though it is passed the expiration date, and you cannot even make a decent sandwich with it. But you know what this is, blog readers? That is my breakfast, yum, it is “Bacn”! Yes, the new hot meme […] &amp#x27A1;
  • 2005
    • Conversations: Tree People and Cave Dwellers It’s been interesting to see how a dis-connected set of blog posts about “distributed conversations” have pretty much emulated the topic. Mine was but one tiny ripple among the tide. With a few iterations of search (lacking an explanation of their syntax), Technorati does a credible job, but is it all the echoes? Just recently, […] &amp#x27A1;
    • On Tiger Previously I described my usual reluctance to be first out of the gate to do an operating system update, so until this afternoon I was still running Jaguar / Mac OSX 10.3. To be honest and repetitive, an operating system is really not something I like to focus on- a good OS should be as […] &amp#x27A1;
    • Shoot ‘Em Up Talk Show Imagine this- a full immersive 3D world where people from remote locations can share and collaborate ideas… and they can blow each other up. I am not a vidoe gamer but can very much appreciate the novelty, originality, and sheer sarcastic fun of This Spartan Life, or how it is billed, “A Talk Show in […] &amp#x27A1;
    • My Favorite Radio Station is 89.7 I am now grooving to the tunes of the station at the bottom of the FM dial – thanks to the arrival yesterday of my new DLO TransPod. As advertised, it is simple to set up and use, and now in my truck I am listening to the tunes and talks from my iPod Shuffle […] &amp#x27A1;
  • 2004
    • RSS Feeds for Maricopa ePortfolio Today I cleaned my desk of paper piles, revamped the “todo” list that overflows from my whiteboard, and finished up a little experiment I had started on our ePortfolio site. Audree Thurman, the clever programmer of this nifty system, had developed a nifty approach for RSS feeds. There is a web page version (human readable) […] &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 *