Forums

Dynamic query_posts and children (2 posts)

  1. ambithium
    Member
    Posted 1 year ago #

    Hi everyone,

    I'm building a magazine in WordPress. Each issue is yearly. I've decided to use categories as the delineator of issues. By doing so I have nice URL structures. blog.com/2010/features. During the current issue blog.com and blog.com/2010 will be identical. That is until content is added to the 2011 category and the site admin flips the switch. I will be creating a plugin that allows for site admins to set which category gets displayed on the homepage and becomes the current issue.

    The category structure is as follows:

    2010
          -Features
          -Faculty
          -Alumni
          ...
          -Student Spotlight
    2011
          -Features
          -Faculty
          -Alumni
          ...
          -Student Spotlight

    What I need to do is something resembling child_of='2010' with name of 'Features' in my query. Because I'm duplicating categories each time there is a new issue, I can't hard code category ID's.

    To reiterate, I'll first need to grab all the posts from the most current top level category as determined by a plugin that sets that variable. Then within all those posts I need to query 5 or 6 posts in varying degrees within each child category based on name.

    Is this making sense? It's late.

  2. MAS
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic