“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.
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.
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 16 posts previously published on April 10th
- 2025
- Cleaning Up, Moving Piles Around the Webhouse For reasons to be seen soon, I am tending to some domain cleanup. Okay, I am moving this blog from shared Reclaim hosting to their cloud hosting. Over 20+ years with this tank/barge a lot of stuff has piled up that can be better left in a quieter corner. Mainly it’s because for at least […]
- 2021
- Demaskulated There is a look in the encounter, from the unmasked to the masked. This is that unstated message, as so, is totally inferred, perhaps imagined? Yet. I feel it each time in encounter with ay service person, pumping gas, or in an encounter outside our bubble home. When I am masked or first to mask, […]
- 2019
- As in Enabling the Unanticipated Like what the world needs is Yet Another Blog Post Defining Openness… (ir in my case, another post about SPLOTs masquerading as another topic?). But the wisps of this have been flitting around back to Open Education Week (when I thought, “why just do this for a week?”) but as well in anticipation of the […]
- 2017
- Open as in Apertures “Open” as a descriptor of things is clear. A door, a faucet, an electronic circuit is open or closed. It works as well for learning things, e.g. educational resources, by a number of licenses. But applying open to concepts like pedagogy as witnessed by a long twitter ping pong and a Grand Groomian post if […]
- 2016
- New WP Theme / Under the Hood Features for Barking Dog Studios For “fun” in the last day or two I have been tinkering and revamping one of my own WordPress sites. One of the things I most enjoy about these episodes is that I typically enter with one goal in mind, and in the process of doing, figuring out, I end up working on things I […]
- Fences and Assurances That’s my new dog Felix, inside my fenced-in yard. The people at the Humane Society told me his owners left him alone in a backyard, and he had escaped several times by jumping the fence. The last time he jumped, his collar got stuck, and he was found hanging there. Brought to the shelter, and […]
- 2015
- Random WordPress Posts With a Time Twist I’m a big fan of randomness. I mean in the web sites I build- they introduce variety to the experience (e.g random blog headers) or to the experience. Something I have rolled into most of my syndicated connected course type sites is a little custom template code that allows me to have links that can […]
- The Six Stages of Web Site Hacked Grief In some of my talks about the open web I make some claim in front of an image of a ying-yang symbol. I sat that to have all of the positive, exciting things we enjoy from the open web, we need to allow for the possibility/potential slimy underbelly that exploits the same affordances of open. […]
- 2013
- Here Lies Feed2JS The dirt goes in the hole by May 30, 2013 (the end date of softlayer’s billing cycle)… the Feed2JS server will be cancelled on May 28, and the lights go out. For some time, the domain will be pointed at an information site on wordpress.con, and a small “nag” notice is now appended to all […]
- 2011
- Road Project: Amazing Stories of Sharing 2011 I’m thinking a lot about my plan to be on the road 4 months starting in June- I’ve carved out a corner of the blog site here to be my record for what I call my “odyssey” (one positive outcome is I can consistently spell that word correctly) — http://cogdogblog.com/odyssey. While I could have made […]
- 2010
- 10 Albums cc licensed flickr photo shared by ·Music Moves My Feet· I will definitely show my age era here. Yes, you kids with your “digital buy a song for 99 cents mix it up on your pod” may have something special you will blog about in 20 years. But for me, in many ways, there was […]
- 2008
- On the Road On the Road by cogdogblog posted 10 Apr ’08, 9.00pm MDT PST on flickr Petal to the metal for today’s trip from Phoenix to Ft Myers… Flaps! Flaps! And a major "Whew" that I am not booked on American Airlines. For perhaps uninteresting list of reasons, my blog juice has run low recently- there was […]
- 2007
- Blog Years Quickly. Little time to blog. A year ago today was my first day on the job at NMC, just a year gone by and so many things have happened. It reminds me of the old Lorne Green A,lpo commercials where hs says something like: Hi. I’m Lorne Greene. And this is my pal, CogDog. You […]
- 2006
- Poor Man’s Screen Cast Not everyone can afford Camtasia and screencast like a pro. And it is PeeCee only. There are other ways to do simple presentations of how to do tasks on a computer. Someone named “djweinstein” has done some elegant tutorials on how to do things in Audacity, by posting them as a flickr set, which can […]
- NMC Day 1.0 I like this new job. My day started as early as normal, with the first chore (coffee making) and than a solid hour run to clear the mind. Then it was the tough choices. Which jeans to slip on? Or just lounge in boxers? Shave or not? (I took jeans and a shave, it is […]
- iRivers Fading Fast Frequent readers may know I have been a fan of the iRiver tiny MP3 players for their recording capability. I had purchased two for us in my last job, and just from a meeting last week, saw that another colleague at Maricopa had purchased one for doing some audio recording. See, the folks at iRiver […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 16 posts previously published on April 10th
- 2025
- Cleaning Up, Moving Piles Around the Webhouse For reasons to be seen soon, I am tending to some domain cleanup. Okay, I am moving this blog from shared Reclaim hosting to their cloud hosting. Over 20+ years with this tank/barge a lot of stuff has piled up that can be better left in a quieter corner. Mainly it’s because for at least […] ➡
- 2021
- Demaskulated There is a look in the encounter, from the unmasked to the masked. This is that unstated message, as so, is totally inferred, perhaps imagined? Yet. I feel it each time in encounter with ay service person, pumping gas, or in an encounter outside our bubble home. When I am masked or first to mask, […] ➡
- 2019
- As in Enabling the Unanticipated Like what the world needs is Yet Another Blog Post Defining Openness… (ir in my case, another post about SPLOTs masquerading as another topic?). But the wisps of this have been flitting around back to Open Education Week (when I thought, “why just do this for a week?”) but as well in anticipation of the […] ➡
- 2017
- Open as in Apertures “Open” as a descriptor of things is clear. A door, a faucet, an electronic circuit is open or closed. It works as well for learning things, e.g. educational resources, by a number of licenses. But applying open to concepts like pedagogy as witnessed by a long twitter ping pong and a Grand Groomian post if […] ➡
- 2016
- New WP Theme / Under the Hood Features for Barking Dog Studios For “fun” in the last day or two I have been tinkering and revamping one of my own WordPress sites. One of the things I most enjoy about these episodes is that I typically enter with one goal in mind, and in the process of doing, figuring out, I end up working on things I […] ➡
- Fences and Assurances That’s my new dog Felix, inside my fenced-in yard. The people at the Humane Society told me his owners left him alone in a backyard, and he had escaped several times by jumping the fence. The last time he jumped, his collar got stuck, and he was found hanging there. Brought to the shelter, and […] ➡
- 2015
- Random WordPress Posts With a Time Twist I’m a big fan of randomness. I mean in the web sites I build- they introduce variety to the experience (e.g random blog headers) or to the experience. Something I have rolled into most of my syndicated connected course type sites is a little custom template code that allows me to have links that can […] ➡
- The Six Stages of Web Site Hacked Grief In some of my talks about the open web I make some claim in front of an image of a ying-yang symbol. I sat that to have all of the positive, exciting things we enjoy from the open web, we need to allow for the possibility/potential slimy underbelly that exploits the same affordances of open. […] ➡
- 2013
- Here Lies Feed2JS The dirt goes in the hole by May 30, 2013 (the end date of softlayer’s billing cycle)… the Feed2JS server will be cancelled on May 28, and the lights go out. For some time, the domain will be pointed at an information site on wordpress.con, and a small “nag” notice is now appended to all […] ➡
- 2011
- Road Project: Amazing Stories of Sharing 2011 I’m thinking a lot about my plan to be on the road 4 months starting in June- I’ve carved out a corner of the blog site here to be my record for what I call my “odyssey” (one positive outcome is I can consistently spell that word correctly) — http://cogdogblog.com/odyssey. While I could have made […] ➡
- 2010
- 10 Albums cc licensed flickr photo shared by ·Music Moves My Feet· I will definitely show my age era here. Yes, you kids with your “digital buy a song for 99 cents mix it up on your pod” may have something special you will blog about in 20 years. But for me, in many ways, there was […] ➡
- 2008
- On the Road On the Road by cogdogblog posted 10 Apr ’08, 9.00pm MDT PST on flickr Petal to the metal for today’s trip from Phoenix to Ft Myers… Flaps! Flaps! And a major "Whew" that I am not booked on American Airlines. For perhaps uninteresting list of reasons, my blog juice has run low recently- there was […] ➡
- 2007
- Blog Years Quickly. Little time to blog. A year ago today was my first day on the job at NMC, just a year gone by and so many things have happened. It reminds me of the old Lorne Green A,lpo commercials where hs says something like: Hi. I’m Lorne Greene. And this is my pal, CogDog. You […] ➡
- 2006
- Poor Man’s Screen Cast Not everyone can afford Camtasia and screencast like a pro. And it is PeeCee only. There are other ways to do simple presentations of how to do tasks on a computer. Someone named “djweinstein” has done some elegant tutorials on how to do things in Audacity, by posting them as a flickr set, which can […] ➡
- NMC Day 1.0 I like this new job. My day started as early as normal, with the first chore (coffee making) and than a solid hour run to clear the mind. Then it was the tough choices. Which jeans to slip on? Or just lounge in boxers? Shave or not? (I took jeans and a shave, it is […] ➡
- iRivers Fading Fast Frequent readers may know I have been a fan of the iRiver tiny MP3 players for their recording capability. I had purchased two for us in my last job, and just from a meeting last week, saw that another colleague at Maricopa had purchased one for doing some audio recording. See, the folks at iRiver […] ➡
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.