I'm using a custom field – entry_type – to add types to posts, for example, Gallery or Announcement etc.
On my archive pages, I want to then separate out the post types stored in entry_type. For examples:
Galleries: Maths gallery 1 Maths gallery 2
Announcements: Maths announcement 1 Maths announcement 2
So far I've got: http://pastebin.com/mRBKGBQD
However, this is pulling in all posts in any category where entry_type is equal to gallery. How can I make it just return the results within the current categories archive?