Support » Everything else WordPress » List categories under condition

  • I have a page with following categories:
    (examples)

    a) Stories (cat ID 1)
    b) Poems (cat ID 2)
    c) Topic: (cat ID 3)
    ca) Cats (cat ID 4, child of 3)
    cb) Dogs (cat ID 5, child of 3)
    cc) Birds (cat ID 6, child of 3)

    Every story is part of category “story” and one of the topic-categories. Every poem belongs to category “piture” and one of the topic-categories.

    On the stories-archive I want to show a list of the categories
    ca), cb), cc), that only contain the stories, but not the poems.

    It should look like this:
    “All stories about
    cats
    dogs
    birds.”

    Selecting “cats”, there should only be shown an archive with only the stories (not the poems) and the topic cats.

    Is there any chance to manage this?

    Thanks!
    Rita

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you are trying to create a “list of categories” where those categories listed can only have posts that belong to other specific categories, then that might prove hard to accomplish.

    But, if you want to list posts that only belong to a certain set of categories, then using the template tag, query_posts(), with the category__and argument makes that objective relatively easy.

    Yes, I want a “list of categories” with posts that belong to another category, but if this isn’t possible I try it with category_and.

    Thanks!

    Learning a lot from the support forum, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘List categories under condition’ is closed to new replies.