Open carstingaxion opened 4 months ago
![image](https://github.com/carstingaxion/additional-advanced-query-loops/assets/198883/b3072d58-56fd-48b1-9263-5f94a11c1dbc)
block
to demo another block
https://gist.github.com/carstingaxion/f98c213aad40d6413fe50eac1cc92228
![image](https://github.com/carstingaxion/additional-advanced-query-loops/assets/198883/1cd63194-a828-483b-925d-159608b1c601)
Hello @ryanwelcher,
feel free to have a look, what was possible in a short time, because of your solid & exciting fundament. Thank you very much for equipping me (and others) with the right tools & code to solve long-standing issues!
It is amazing 🎈 🎉 🥳 !
https://github.com/carstingaxion/additional-advanced-query-loops/assets/198883/b7f25755-6c58-4228-85b0-eb8f7f183540
Contextual queries with
Screenshot of a demo to show & test different uses of a new contextual-query-block.
The demonstrated queries are:
Finished my ideas around queries by contextual date. Inspired by
This looks great, thanks for working on it!
It's not yet quite what I am hoping for. In my case, I would like to specify a date - either contextually (for example, using the date the post was published), or by choosing it directly (via a calendar selection).
So if the date was 2023-05-20, then the query would return any posts published on YYYY-05-20 across all the years (which in my case could back over 20 years).
Just to offer a little more context, my site is all about natural history, and I have been posting photojournals of what I observe on a given day going back to the early 2000s. With the functionality I'm hoping for, it would be easier to create a daily or weekly almanac of sorts for my area.
Thank you!
This looks great, thanks for working on it!
Thank you @mrgoff93
It's not yet quite what I am hoping for. In my case, I would like to specify a date - either contextually (for example, using the date the post was published), or by choosing it directly (via a calendar selection).
Ok, this is already in place & should work.
So if the date was 2023-05-20, then the query would return any posts published on YYYY-05-20 across all the years (which in my case could back over 20 years).
You are right, this is not possible right now. But what I did so far is close to that and it might be not of a big deal to extend the existing logic. Currently you can query for what happened on day x 13 years ago, but not on day x over the last 13 years.
Just to offer a little more context, my site is all about natural history, and I have been posting photojournals of what I observe on a given day going back to the early 2000s. With the functionality I'm hoping for, it would be easier to create a daily or weekly almanac of sorts for my area.
This is really cool, you are describing your use-case like this. I had some similar thoughts, imaginating someone doing wild-life photography during all seasons of the year and for many years. That feels super-close to what you describe.
it might be not of a big deal to extend the existing logic
@mrgoff93 No, it wasn't. Exactly 4 lines of code added, to make this work.
Now, it seems to be the perfect sibling to @coffee2code|s - Years Ago Today – Dashboard widget.
contextual-query-loop
branch