I love Cwicly more than anything in WordPress right now, particularly because of the clean code it outputs. However, the query has actually become one of my biggest pain points lately.
When I first wrote about it, I was wondering if the query HTML output could be cleaner, but now I’ve had a few situations where the query block output is actually limiting me, and I’m forced to use a code block with my own custom query.
A real-life example I had recently: I needed an unordered list with post items where the first
<li> is static and the rest are query items. The structure is pretty straightforward:
It seemed like an easy task, but no. Since we cannot change the tag for “querytemplate” and “cc-query-item”, the desired layout cannot be achieved. Of course, I can visually make it look the way I want, but the HTML is definitely not what I want.
Another situation I had recently involved a query that needed to be laid out as a table, with a static table header and query items as rows. Again, I failed with Cwicly’s query block to achieve the proper HTML layout, and I had to create my own custom query, which is a bit of shame because my goal for “no-code” approach is the main reason I use Cwicly in the first place.
So, I wish there was more flexibility in this regard, specifically the option to apply the desired tags and classes for “querytemplate” and “cc-query-item”.
I actually really like Bricks’ approach, where any div can be turned into a query without any extra wrappers - so you get exactly what you made. For testing purposes, I tried both of my cases in Bricks and easily accomplished them with their query solution.
I hope @Louis takes a look at this and provides more flexibility with the query block in the future.