Coming from C#, one my favorite additions to that language was null coalescing operator. I’m happy to say that PHP 7 has added this operator and it’s a great operator that can make your code more clear and purposeful. Would you like to coalesce? The word coalesce according to one dictionary is a verb that […]
Category: Code
How Get all WordPress posts that have a custom field
How to get posts that do NOT have a custom field value
The way WordPress decided to deal with adding custom pieces of data is both cumbersome and elegant. Because it stores ALL metadata in one table, it can be painful to try to figure out what a data object looks like. Things like adding Foreign keys and enforcing certain relationships can not be done easily. Your […]
What would a PURE binary clock REALLY look like?
I was looking through some of my CSS experiments I did a while ago, and I found an experiment I did with binary on CodePen. See the Binary Flower Clock It was a fun little project and thoroughly nerdy, but it probably requires a little bit of explanation. First of all, what can a binary representation […]
Teach your kids binary (Part 1: Logic)
Computers 101. It’s all magic, right? You’ve probably heard that deep down inside, computers are just 1s and 0s. Maybe someone told you that when you write a text or make a phone call everything is coded into this magical digital language of ones and zeros and then those ones and zeros are sent along some cable at the speed of electrons […]
Creating Custom Category Layouts using the Divi theme
Recently, I ran into an issue where I wanted to easily define layouts for a Divi theme for different categories. Note, I don’t use Divi for this blog, but in my day job, we have a lot of Divi-based sites.
For this particular site, I wanted to allow content creators to easily customize layouts for different categories or group of categories using Divi.
Categorize meta data from a get_results call in WordPress (Part 2)
Flatten a hierarchical JSON object into a table
Recently I had a requirement to take a list of JSON objects that had a hierarchical structure and represent it as a table. For reference, here’s a sample of what the JSON object looked something like. If you want to try on your own, feel free to copy below. [{ “ProductVariants”: [{ “Images”: [{ “ImageTypeID”: 27, […]