Outboard Memory – Query Thumbnails & Crop Images CSS Trick
Two little tricks that came up this week . . .
Random Posts Must Have Featured Image Set
Sometimes you want to query a random set of posts but only return those with featured images . . . you can using ‘meta_key’ => ‘_thumbnail_id’ like so . . .
$args = array(
'post_type' => 'project',
'posts_per_page' => 3,
'orderby' => 'rand',
'meta_key' => '_thumbnail_id',
$the_query = new WP_Query( $args );
Handy. At least for me.
Now that I’ve got featured images, I usually have a variety of aspect ratios making uniform layouts a pain.
Enter object-fit and if you already knew of it I don’t know why you didn’t tell me. You can see the difference it makes in the two examples embedded below. Not earth shattering but really handy for stuff I do all the time.
See the Pen GvNdjv by Tom (@twwoodward) on CodePen.
IdeaX Proposal – Tiny Targeted Tools
Image from page 98 of “Illustrated catalogue and general description of improved machine tools for working metal” (1899) flickr photo by Internet Archive Book Images shared with no copyright restriction (Flickr Commons)
I submitted to one of our regional instructional developer organization (Instructional Development
?Educational Alliance Exchange) this AM. We’ll see if it gets accepted but given my recent reflection on things that seem to have worked in Rampages, the chunk I left out that’s built in Google, Jim’s recent post from Australia, and Alan and Brian‘s continued SPLOT work . . . it seemed like a nice chance to spread this particular word to a VA audience. I also find that articulating concepts like this for other audiences helps me better articulate why I think this work is important. I can’t just say “SPLOT” and have my six friends understand what I’m going to talk about. There’s a place for that.
There is a tendency to make or buy tools that try do everything. As a result we end up with a massive tool that does most things poorly and few things well. Learning goals get obscured by the increasing complexity involved in navigating the compromises inherent in the omni-tool. It’s not focused on a particular discipline or kind of thinking.
While generic tools have their place, that place should not be ubiquitous.
Today’s technology lets us build tiny, targeted tools that get learners to the learning with as little unwanted friction as possible. These tools can be built quickly and with virtually no cost on a number of platforms by people with all technological skill levels.
Content creation in these targeted tools offers an increasingly sophisticated way to scaffold analysis, entwined instructional resources, and build a unique experience for students- all while creating useful work. This work can then be used for additional educational purposes as the aggregate grows in scale and complexity.
In this session will use some examples of these tools across a number of disciplines built in both Google and WordPress. We’ll then build a functioning tool using Google products and an extension called Awesome Table (https://awesome-table.com/). No HTML skills or programming knowledge is needed.