Custom Query sorting by type?
-
Hi, I’m trying to write a custom query to list posts within the current category and have them sorted by type so that it outputs as such.
<ul> <li><h2>Documents</h2><li> <li>post name</li> … <li><h2>Galleries</h2></li> <li>post name</li> … <li><h2>AudioVideo</h2></li> <li>post name</li> … </ul>
Rather than querying the database for the contents of the post and determining their type there I’ve added a custom key to each post of Document, Gallery, Video and Audio. Video and Audio are combined in the same group on output.
While I can just about build a simple custom query I can’t get the output to be ordered exactly as I’d want. Could anyone help with this?
Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom Query sorting by type?’ is closed to new replies.