I am wondering if it is possible to have a query (rather than a space lua function) that will omit tasks on any page that has an attribute 'hidden: true' the front matter.
Not exactly what you are asking, but an easy way to get this behavior, is to add a tag to the page in the frontmatter (tags: "#hideTasks" instead of hidden: true).
Then you can use the following query to show all tasks which do not have a #hideTasks itag.
${query[[from o = index.tag "task" where not table.includes(o.itags, "hideTasks")]]}
Thanks .. that's a good approach but limits the query selection to one specific attribute (tags) on the page where the task exists.
It would be nice if any frontmatter attribute could be used, not just tags.
BTW I'm using your solution ![]()