“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 June 28th

  • 2025
    • Flickr Goes 4.0 CC Licenses so My CC Attribution Helper Follows Throw a party, in 2025 Flickr announces the arrival of Creative Commons version 4.0 licenses (cough, 12 years in the works?). I’d seen the announcement banner on flickr, though gave it no notice (especially since I use CC0 on my own photos, no versions needed). That is until I spotted a note from Sarah Honeychurch […]
  • 2019
    • I’m Breaking the Web: I’ve Come to Bury Feed2JS (maybe) I’ve done my fair share of railing against entities that destroy web sites, be it Wikispaces, Storify, Google… today is my turn to be the reaper. As far as I can tell, Feed2JS my long running web service that enabled ordinary humans to insert dynamic RSS feed content into web pages, is kaput. I’ve been […]
  • 2016
    • Surprisingly, the default for the Internet Archive is Don’t Archive NEWS FLASH! My wayback is back! Let me first say that the Internet Archive is one of the most important, impressive crowning achievements we have for preserving and understanding what is truly a transient information space. And I rely regularly on the WayBack Machine to research, discover, and fall into interesting rabbit holes. And let […]
  • 2014
    • Never been to ISTE This was totally inspired by Ben Rimes cover of “Imagine” for those #notAtISTE @cogdog Apparently it's a big conference? I'm doing a few other things instead of going 🙂 https://t.co/LgiFygXMfX — Ben Rimes (@techsavvyed) June 27, 2014 On reflecting up on this, I was moved to mention I’ve never been to ISTE (technically incorrect, I […]
  • 2013
    • Come Stamen With Me If you see my flickr stream you will find a lot of flower photos. In some ways there are not too many things you can do to change up the standard shot. In lieu of having a macro lens, I have an approach for these extreme closeups– for me, I find this move in very [...]
    • Dad’s Level (and inside the photo) I have an attraction for taking photos of old objects that have a lot of wear and tear, like this wooden level that belonged to my Dad. Wood has this sense of absorbing some energy from the person that holds it (or it makes a nice story to tell), where is modern tools of plastic, [...]
    • Leave it to a Dog to Fix the Keynote Autotweeter cc licensed ( BY NC SA ) flickr photo shared by Travis Estell UPDATE (Sep 21, 2013): If you are new to setting this up, see the new instructions. Poor Dean Shareski, he cannot send tweets out from his Keynote presentations a la the methods previously written up here. @cogdog I think this means keynote […]
    • Rhizomatic Fine, But What About Transplanting? cc licensed ( BY SA ) flickr photo shared by Alan Levine Probably my most rewarding activity since returning to my home in Arizona late last year has been tending to my landscape. Just for the record, while I live in Arizona, my house is on the edge of the Colorado Plateau, and I am […]
  • 2009
    • Mapping My Way cc licensed flickr photo shared by cogdogblog I’ve been saying that annotating maps is one of the most under-used edtech tools, given the wonderful capabilities one can do (for free) in Google MyMaps– Gmaps are more than finding driving locations to the nearest sushi bar. The fact that you can mark up anywhere in the […]
  • 2008
    • Visualizing Twitterness with TwitArcs Here’s another interesting tool for visualizing relationships in twitter, Jeff Clark’s TwitArcs: I’ve combined some visuals from a side project related to linguistics with twitter data to create TwitArcs. It takes the latest 100 tweets for a twitter ID or term of interest and creates a list representation that has arcs connecting messages sent to […]
  • 2007
    • Forgotten Slidez On rummaging through some bookmarks, I saw a number of sites I could barely remember, and a number of them were ones I had created accounts. This is the beginning of social software amnesia. For some reason, I decided to go back to one, slidez, which is not all that unique, but certainly works elegantly […]
    • User Generated Video Captioning – How About it? I love the idea of dotsub.com user generated video captioning — In the spirit of blog efficiency/laziness, I am copy/pasting what I‘ve just posted at the NMC Campus Observer: A few weeks ago we shared about a nifty new web video concept where uploaded video is set up so speakers of other languages can add […]
  • 2006
    • Yes, We’re Dressed When Working From Home flickr foto Geek!available on flickr Yes, he’s on holiday. Yes, he’s in a garden. Yes, he’s checking his email. Yes, he wanted to "work from home" the following week. It never fails when someone asks me about working from home…. within seconds there is some snickering reference to, “working in your underwear….” So funny. Why […]
    • Dead, Toothless Mouse Found Under Truck Tire I thought I was on the road of redemption with my new found love for a multi-button mouse, a Kensington Bluetooth PilotMouse. The need for this came as a result of the lack of any way on the XP side of my MacBookPro to right click anything. The Kensington mouse I got had a great […]
    • TED Talks (and Podcasts, Vodcasts, etc) I am about 99999.9% sure (always leave room for doubt) I will never be among the digerati sitting in the plush red seats for a TED conference. No dogs allowed, eh? However, I did, a few months ago, happen to be at a home of someone who has, and got to see watch on DVD […]
  • 2005
    • The (Browser) Transformation is Complete – The Safari has Been Out Foxed I’ve been jumping between my Mac web browsers, habitually in Safari, running to FireFox to try the cool new stuff, or to log into a site as a different user. But now I think I will not be going back to Safari. There is just Too Much Cool Firefox Stuff– greasemonkey, the search plug-ins, RSS […]
    • In The Fire’s Path This is the real kind of scary. A large wildfire has been raging this week north of the metro Phoenix area– while some 11 properties in the forest burned, the far north bits of million dollar homes were spared of damage by the Cave Creek Fire. The world’s largest saguaro cactus was a victim along […]
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 June 28th

  • 2025
    • Flickr Goes 4.0 CC Licenses so My CC Attribution Helper Follows Throw a party, in 2025 Flickr announces the arrival of Creative Commons version 4.0 licenses (cough, 12 years in the works?). I’d seen the announcement banner on flickr, though gave it no notice (especially since I use CC0 on my own photos, no versions needed). That is until I spotted a note from Sarah Honeychurch […] &amp#x27A1;
  • 2019
    • I’m Breaking the Web: I’ve Come to Bury Feed2JS (maybe) I’ve done my fair share of railing against entities that destroy web sites, be it Wikispaces, Storify, Google… today is my turn to be the reaper. As far as I can tell, Feed2JS my long running web service that enabled ordinary humans to insert dynamic RSS feed content into web pages, is kaput. I’ve been […] &amp#x27A1;
  • 2016
    • Surprisingly, the default for the Internet Archive is Don’t Archive NEWS FLASH! My wayback is back! Let me first say that the Internet Archive is one of the most important, impressive crowning achievements we have for preserving and understanding what is truly a transient information space. And I rely regularly on the WayBack Machine to research, discover, and fall into interesting rabbit holes. And let […] &amp#x27A1;
  • 2014
    • Never been to ISTE This was totally inspired by Ben Rimes cover of “Imagine” for those #notAtISTE @cogdog Apparently it's a big conference? I'm doing a few other things instead of going 🙂 https://t.co/LgiFygXMfX — Ben Rimes (@techsavvyed) June 27, 2014 On reflecting up on this, I was moved to mention I’ve never been to ISTE (technically incorrect, I […] &amp#x27A1;
  • 2013
    • Come Stamen With Me If you see my flickr stream you will find a lot of flower photos. In some ways there are not too many things you can do to change up the standard shot. In lieu of having a macro lens, I have an approach for these extreme closeups– for me, I find this move in very [...] &amp#x27A1;
    • Dad’s Level (and inside the photo) I have an attraction for taking photos of old objects that have a lot of wear and tear, like this wooden level that belonged to my Dad. Wood has this sense of absorbing some energy from the person that holds it (or it makes a nice story to tell), where is modern tools of plastic, [...] &amp#x27A1;
    • Leave it to a Dog to Fix the Keynote Autotweeter cc licensed ( BY NC SA ) flickr photo shared by Travis Estell UPDATE (Sep 21, 2013): If you are new to setting this up, see the new instructions. Poor Dean Shareski, he cannot send tweets out from his Keynote presentations a la the methods previously written up here. @cogdog I think this means keynote […] &amp#x27A1;
    • Rhizomatic Fine, But What About Transplanting? cc licensed ( BY SA ) flickr photo shared by Alan Levine Probably my most rewarding activity since returning to my home in Arizona late last year has been tending to my landscape. Just for the record, while I live in Arizona, my house is on the edge of the Colorado Plateau, and I am […] &amp#x27A1;
  • 2009
    • Mapping My Way cc licensed flickr photo shared by cogdogblog I’ve been saying that annotating maps is one of the most under-used edtech tools, given the wonderful capabilities one can do (for free) in Google MyMaps– Gmaps are more than finding driving locations to the nearest sushi bar. The fact that you can mark up anywhere in the […] &amp#x27A1;
  • 2008
    • Visualizing Twitterness with TwitArcs Here’s another interesting tool for visualizing relationships in twitter, Jeff Clark’s TwitArcs: I’ve combined some visuals from a side project related to linguistics with twitter data to create TwitArcs. It takes the latest 100 tweets for a twitter ID or term of interest and creates a list representation that has arcs connecting messages sent to […] &amp#x27A1;
  • 2007
    • Forgotten Slidez On rummaging through some bookmarks, I saw a number of sites I could barely remember, and a number of them were ones I had created accounts. This is the beginning of social software amnesia. For some reason, I decided to go back to one, slidez, which is not all that unique, but certainly works elegantly […] &amp#x27A1;
    • User Generated Video Captioning – How About it? I love the idea of dotsub.com user generated video captioning — In the spirit of blog efficiency/laziness, I am copy/pasting what I‘ve just posted at the NMC Campus Observer: A few weeks ago we shared about a nifty new web video concept where uploaded video is set up so speakers of other languages can add […] &amp#x27A1;
  • 2006
    • Yes, We’re Dressed When Working From Home flickr foto Geek!available on flickr Yes, he’s on holiday. Yes, he’s in a garden. Yes, he’s checking his email. Yes, he wanted to "work from home" the following week. It never fails when someone asks me about working from home…. within seconds there is some snickering reference to, “working in your underwear….” So funny. Why […] &amp#x27A1;
    • Dead, Toothless Mouse Found Under Truck Tire I thought I was on the road of redemption with my new found love for a multi-button mouse, a Kensington Bluetooth PilotMouse. The need for this came as a result of the lack of any way on the XP side of my MacBookPro to right click anything. The Kensington mouse I got had a great […] &amp#x27A1;
    • TED Talks (and Podcasts, Vodcasts, etc) I am about 99999.9% sure (always leave room for doubt) I will never be among the digerati sitting in the plush red seats for a TED conference. No dogs allowed, eh? However, I did, a few months ago, happen to be at a home of someone who has, and got to see watch on DVD […] &amp#x27A1;
  • 2005
    • The (Browser) Transformation is Complete – The Safari has Been Out Foxed I’ve been jumping between my Mac web browsers, habitually in Safari, running to FireFox to try the cool new stuff, or to log into a site as a different user. But now I think I will not be going back to Safari. There is just Too Much Cool Firefox Stuff– greasemonkey, the search plug-ins, RSS […] &amp#x27A1;
    • In The Fire’s Path This is the real kind of scary. A large wildfire has been raging this week north of the metro Phoenix area– while some 11 properties in the forest burned, the far north bits of million dollar homes were spared of damage by the Cave Creek Fire. The world’s largest saguaro cactus was a victim along […] &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 *