WordPress.org

Ready to get started?Download WordPress

Forums

Anyone ever tried this? (3 posts)

  1. scheurbert
    Member
    Posted 8 years ago #

    I'm trying to make a magazine style website for a publication that I am involved with and I'm using WordPress to do it. One such thing I am trying to do is to show pages/lists of links of each related article to that issue.

    What I've done so far is created two main categories: one for year and one for which issue it is. I've also got other categories for the types of articles such as features, columns, reviews, etc.

    What I'd like to do is display a list of articles in their own category within the issue category. For a visual example, see this:

    Issue 12:

    - Features:
    * Article
    * Article
    * Article

    - Columns:
    * Article
    * Article
    * Article

    - Reviews:
    * Article
    * Article
    * Article

    My understanding of doing it at the moment would be to make the categories such as "Features", "Columns" and "Reviews" as children of the "Issue 12" category. Unfortunately, this means I need to duplicate the "Features", "Columns" and "Reviews" categories for each issue which in turn will be a lengthy process.

    I have basic knowledge of PHP and MySQL and how the WordPress database is structured is above my skill level in trying to retrieve categories and posts which are related (not a parent) of another category.

    I'm interested if any other persons have wanted to do a similar thing to viewing posts withing a category which are also related to another category or two (I guess you could consider it "filtering"). So far I haven't been able to find a plugin that does such a thing. It may be that I can't do this and will just have to figure out another method of display issue archives and navigation. Any help is greatly appreciated!

  2. davidchait
    Member
    Posted 8 years ago #

    The features, et al, categories can all be 'global'. You don't need to make them per-issue or anything like that. However, you will need some custom queries in order to filter on issue and then things under issue.

    The problem I find is that the filtering overlaps. You'd need to query on posts where the post_category table has an entry for issue_X. If you do that, you can then sort yourself (assuming not many) on the article-type sub-category. You could obviously also do N different queries, for issue_X+type_A, issue_X+type_B, etc. That's just a lot more work, and needs to be updated for each type added...

    I have a 'post type' that is separated from the categories, which allows me to do that filtering a bit easier. At the moment, it requires an extra field added to the primary post table though, in order to get the type of queries and performance I needed...

    But, you can certainly achieve what you need within the current categorization system. If not, use of custom post fields is another route. You could actually do the year and issue as custom fields, and the article types as the cats... Oh, and note that you can already do by-year archive listings, so you don't necessarily need to keep that (the date of the post should have the year already...).

    d

  3. scheurbert
    Member
    Posted 8 years ago #

    Cool, thanks for your help. Puts many things in perspective. I guess I just needed to explore WP more rather than just plugins.

    Thanks again

Topic Closed

This topic has been closed to new replies.

About this Topic