• Hey,

    I’m trying to make a page template to use on my site to display musical compostions I’ve made. All of the tunes are sorted into subcategories of the main category ‘ML Music’ (All songs are also directly in the main category, ML Music).

    I’ve been messing around with the code, but I think there’s an easier way to do it than manually listing all the subcategories and the compositions in each.

    This is basically what I want to do, in non-PHP format.

    [for each sub-category of category 42 ] {

    • [sub-category name]
    • [list all posts in this specific sub-category]

      I have some knowlege of PHP and template tags, so I can get all of the right info to show up for each tune, but I’m having trouble compressing the code.

      Can anybody convert my “psuedo-code” into the applicable PHP?

      Thanks,
      – Patrick (AKA MercuryLime)

Viewing 1 replies (of 1 total)
  • trying to make a page template…
    and
    list all posts in this specific sub-category

    These two won’t go together, so I assume that’s what causes your problme.
    For displaying posts (be it just the title) in a category (or subcategory, it doesn’t matter) you do not use Pages. You should use Category Templates.
    http://codex.wordpress.org/Category_Templates

Viewing 1 replies (of 1 total)

The topic ‘sorting posts into sub-categories’ is closed to new replies.