Fun With Query Loop Blocks

Some years ago I started creating “Game Tools” pages for the games that I care an awful lot about. These were partially simply a way of collating the links and resources that I was using while playing said game in an easy-to-find format so that I could jump to it whenever I returned to a game. The problem with bouncing between games is that my aging mind can’t always remember the tools that I utilized when I last played that game. The Game Tools pages give me a point of reference so that I can hop back in and see what external tools or add-ons that I was using the last time I played. More than that however the internet has become a very fickle place, and tools and resources can often get buried in a deep stack of SEO-optimized click-farming bullshit. By documenting the resources I am using, I am also giving a hand up to anyone who happens to come along behind me.

Weirdly enough these pages seem to gain traction over time as a landing page for folks looking for information for that game. Thing is… I was doing myself a bit of a disservice because I never really included my own content in the list of things that I had been linking to. I kept thinking that there had to be an easy way to embed the content for that specific topic in a page so that folks could easily jump off to the latest posts that I have released in a given category. Enter the Query Loop block, which essentially does exactly this. You can embed it in an existing page and either sort by taxonomy elements and pull in posts that belong to specific categories or have specific tags, or you can do a free-form keyword search that queries the text of all of your blog posts and returns the latest that have those specific keywords. For me, it was pretty easy given that I have fairly structured categories and I’ve been going through and updating the individual game tool pages with a content block filtered to the most relevant category. This makes me contemplate how I have my menu structured though and maybe have higher blocks for ARPGs for example that links to content for ALL of the ARPG games that I often write about.

There are a good number of patterns that you can choose from when displaying the content block, and for the most part, I have landed upon the large left image with the content snippet. However, I think at some point I will probably create my own custom block because I would rather have the snippet and title justified on the left border and the image floating off to the right. If they have premade patterns there has to be a way to craft your own, so that is something I will dive into at a later date. For the most part the existing patterns work well enough.

The end result works well enough, but I do not love the fact that it overflows the boundaries of the content block for my blog. I might see what I can do to reign that in a bit or instead shift to one of the other patterns. For now, I am calling this good and have updated all of the fixed tool pages to follow this format. Mostly I thought I would share this for any WordPress self-hosters so you can play with it as well. I have no clue if the query loop block exists in the dotcom version of WordPress but I would be shocked if it did not.