WordPress.org

Ready to get started?Download WordPress

Forums

Different kinds of categories, different section of a page (3 posts)

  1. PeterBaker3000
    Member
    Posted 7 years ago #

    What I'm trying to do is a sort of combination of photoblog and text blog. Each post type (photo and text) can be under a number of categories (cities, for example. New York, Paris, Tokyo).

    So I've set up parent and child categories like so:

    + New York City
    --- Photos
    --- Blog
    + Paris
    --- Photos
    --- Blog
    + Tokyo
    --- Photos
    --- Blog

    My question then is, how can I separate the photo category entries from the blog category entries? Like if I was on the New York City archive, I'd want the posts from "New York City > Photos" in one area of the page, and "New York City > Blog" in another area of the page.

    BUT, I don't want to have to choose the category by a hard-coded category ID, so doing it by the category_nicename seems like the way to go. Like being on the New York archive page and find the posts that are under the category with nicename=photos AND the parent category=nyc. The reason for this is to be able to add new cities without manually creating new archive pages with those category ids.

    I'm really new to wordpress, but I'm pretty php-savvy, but I'm coming from a movable type knowledge base, where I'd just set up two different blogs altogether for photos and text and combine them on the display.

    So...
    1) Is that the best way to structure the posts/categories?
    2) Is there a way to get posts based on the categories' category_nicename?

  2. Chris_K
    Member
    Posted 7 years ago #

    I wonder how much of that you could pull off with some Category_Templates?

  3. Niklas
    Member
    Posted 7 years ago #

    I am resurrecting this old post due to a similar problem.

    How do I list posts from a category on a Page?

Topic Closed

This topic has been closed to new replies.

About this Topic