“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 15 posts previously published on April 14th

  • 2025
  • 2024
    • Hello [Fedi] World, ActivityPub On There was a moment at the [brilliant] #OER24 conference keynote duo by Catherine Cronin and Laura Czernowicz “The future isn’t what it used to be: Open education at a crossroads” when they asked the audience to Menti respond to a question about what we should do as an action. Watching the responses roll by when […]
  • 2022
    • 6x6x5 That One Thing Now I slide down a potentially slippery incline plane to make a case for a life philosophy based on a line from a cheesy comedy-western film. Hardly the fodder for rigorous academic inquiry. Note: This is another installment in my participation in the 2022 Write 6×6 Challenge, they must sometimes shake their heads at what […]
  • 2021
    • Doh! WordPress It was just shy of 16 years ago (Homer’s math was wrong) that I dove into WordPress on this here blog. I still make Homer head-slapping type mistakes. Here’s today’s edition. Maybe you do not know this. but WordPress does it’s best to connect the name for a post if there is not an exact […]
    • Did you hear? FeedBurner Subscriptions Bite the Dust Cue up the music, because Google again does another round of creating dust of your web services. I got an email from Google letting me know that Feedburner is getting dusty. Well, maybe they are not deleting the service, but taking away from it. Sure grandpa, who cares? What the heck is Feedburner? It stems […]
    • So *That* is What Was Inside the Wix Box? Flatter me and offer to ship a mystery box? At some level I was intrigued, but at the next level down, skeptical. Choose one – curiousity or caution? I went with the latter. In January I got an unsolicited email message from someone at Wix. (I respect their privacy, and changed the name). Hi Alan, […]
  • 2014
    • Stick a Fork in It Or Just Fork It: DS106 Assignment Bank Theme creative commons licensed ( BY-NC-ND ) flickr photo shared by mariateresa toledo When I started last August to develop a WordPress Theme that would provide the functionality of the ds106 Assignment Bank, I told Jim Groom that I thought I could get it ready in a month. By December, I thought I could wrap it […]
  • 2011
    • Radio Love / Love Radio cc licensed ( BY ) flickr photo shared by cogdogblog I aspire one day to be as cool at the audio helm as DJ Lamb. Until then, I relish the experimental, free form, nobody gives a s*** if you screw up place we have come to hail as ds106 radio (soon to be subject of […]
  • 2009
    • It’s April, Which Means it is TCC Time of the Year Since it has been on going for almost as long as I have been in the ed tech field (going back to 1996), the annual Technology, Colleges and Community conference feels like a regular part of the changing seasons. This annual online conference may be the longest running international technology conference (I am sure someone […]
  • 2007
    • TLA, Ergo Sum In education, and technology, but no different from most other fields, we sure can get mired in definitions. It seems… that the mere fact of identifying something with a TLA (Three Letter Acronym), that it exists. Like last Decemberm when I got invited to be on the planning committee for the EDUCAUSE ELI Focus Session […]
  • 2005
    • The Dog Barfed Up Some Comments Although I noted yesterday that my own technical gaffs had erase all of our blog comments going back to September 2004, I did comb through the last database dump from early March 2005 and sifted out the legit comments for Sept 2004 – March 3, 2005, so the loss was the last month and a […]
    • Gearing Up for TCC 2005 Keynote Next week, April 19-21, is the 10th annual Teaching, Colleges, Community (TCC) Worldwide Online Conference, or affectionately known as “the online conference from Hawaii where you do not get to go to Hawaii”. I’m ramping up to deliver a live keynote session on April 21 (see below). The theme this 10th anniversary year is “Looking […]
    • Go Get Thawed: NBT- Locally Produced Movie Aimng High Arizona may not have a reputation for producing local independent movies, but Never Been Thawed may change all that. I saw the previews a few weeks ago, and could tell it would be a riot. Yup, I going by my guy and saying it is a good movie before having seen it…. Better known (or […]
  • 2004
    • TCC2004 PhotoBlog Taking Off My presentation on PhotoBlogging at the Teaching in the Community Colleges 2004 Online Conference is inching along- tomorrow is the big sprint to wrap up all the audio for the Breeze Presentation. Biff is out of town, so I will have to wing it alone. I have a tape of digitized audio from a group […]
    • The RSS Winterfest Will Not Stop (Annoying Me) The party from the January RSS Winterfest seems to be lingering on- but I am not festive. I get daily emails notifying me of changes on their site, which I am not following nor interested in. Four freakin’ times I used the link on their messages to set up email notifications to “never” . But […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 15 posts previously published on April 14th

  • 2025
  • 2024
    • Hello [Fedi] World, ActivityPub On There was a moment at the [brilliant] #OER24 conference keynote duo by Catherine Cronin and Laura Czernowicz “The future isn’t what it used to be: Open education at a crossroads” when they asked the audience to Menti respond to a question about what we should do as an action. Watching the responses roll by when […] &amp#x27A1;
  • 2022
    • 6x6x5 That One Thing Now I slide down a potentially slippery incline plane to make a case for a life philosophy based on a line from a cheesy comedy-western film. Hardly the fodder for rigorous academic inquiry. Note: This is another installment in my participation in the 2022 Write 6×6 Challenge, they must sometimes shake their heads at what […] &amp#x27A1;
  • 2021
    • Doh! WordPress It was just shy of 16 years ago (Homer’s math was wrong) that I dove into WordPress on this here blog. I still make Homer head-slapping type mistakes. Here’s today’s edition. Maybe you do not know this. but WordPress does it’s best to connect the name for a post if there is not an exact […] &amp#x27A1;
    • Did you hear? FeedBurner Subscriptions Bite the Dust Cue up the music, because Google again does another round of creating dust of your web services. I got an email from Google letting me know that Feedburner is getting dusty. Well, maybe they are not deleting the service, but taking away from it. Sure grandpa, who cares? What the heck is Feedburner? It stems […] &amp#x27A1;
    • So *That* is What Was Inside the Wix Box? Flatter me and offer to ship a mystery box? At some level I was intrigued, but at the next level down, skeptical. Choose one – curiousity or caution? I went with the latter. In January I got an unsolicited email message from someone at Wix. (I respect their privacy, and changed the name). Hi Alan, […] &amp#x27A1;
  • 2014
    • Stick a Fork in It Or Just Fork It: DS106 Assignment Bank Theme creative commons licensed ( BY-NC-ND ) flickr photo shared by mariateresa toledo When I started last August to develop a WordPress Theme that would provide the functionality of the ds106 Assignment Bank, I told Jim Groom that I thought I could get it ready in a month. By December, I thought I could wrap it […] &amp#x27A1;
  • 2011
    • Radio Love / Love Radio cc licensed ( BY ) flickr photo shared by cogdogblog I aspire one day to be as cool at the audio helm as DJ Lamb. Until then, I relish the experimental, free form, nobody gives a s*** if you screw up place we have come to hail as ds106 radio (soon to be subject of […] &amp#x27A1;
  • 2009
    • It’s April, Which Means it is TCC Time of the Year Since it has been on going for almost as long as I have been in the ed tech field (going back to 1996), the annual Technology, Colleges and Community conference feels like a regular part of the changing seasons. This annual online conference may be the longest running international technology conference (I am sure someone […] &amp#x27A1;
  • 2007
    • TLA, Ergo Sum In education, and technology, but no different from most other fields, we sure can get mired in definitions. It seems… that the mere fact of identifying something with a TLA (Three Letter Acronym), that it exists. Like last Decemberm when I got invited to be on the planning committee for the EDUCAUSE ELI Focus Session […] &amp#x27A1;
  • 2005
    • The Dog Barfed Up Some Comments Although I noted yesterday that my own technical gaffs had erase all of our blog comments going back to September 2004, I did comb through the last database dump from early March 2005 and sifted out the legit comments for Sept 2004 – March 3, 2005, so the loss was the last month and a […] &amp#x27A1;
    • Gearing Up for TCC 2005 Keynote Next week, April 19-21, is the 10th annual Teaching, Colleges, Community (TCC) Worldwide Online Conference, or affectionately known as “the online conference from Hawaii where you do not get to go to Hawaii”. I’m ramping up to deliver a live keynote session on April 21 (see below). The theme this 10th anniversary year is “Looking […] &amp#x27A1;
    • Go Get Thawed: NBT- Locally Produced Movie Aimng High Arizona may not have a reputation for producing local independent movies, but Never Been Thawed may change all that. I saw the previews a few weeks ago, and could tell it would be a riot. Yup, I going by my guy and saying it is a good movie before having seen it…. Better known (or […] &amp#x27A1;
  • 2004
    • TCC2004 PhotoBlog Taking Off My presentation on PhotoBlogging at the Teaching in the Community Colleges 2004 Online Conference is inching along- tomorrow is the big sprint to wrap up all the audio for the Breeze Presentation. Biff is out of town, so I will have to wing it alone. I have a tape of digitized audio from a group […] &amp#x27A1;
    • The RSS Winterfest Will Not Stop (Annoying Me) The party from the January RSS Winterfest seems to be lingering on- but I am not festive. I get daily emails notifying me of changes on their site, which I am not following nor interested in. Four freakin’ times I used the link on their messages to set up email notifications to “never” . But […] &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.

    If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
    Become a patron at Patreon!
    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 *