WordPress.org

Ready to get started?Download WordPress

Forums

list posts belonging to either child cat but has to be one other (2 posts)

  1. jesseisrad
    Member
    Posted 4 years ago #

    Not sure how to explain this but I'm trying to list posts that that have to be in either category of a certain parent AND some other category.

    Basically, I have a parent cat of "blogs" and in that cat are a few diff "blog" categories.

    I want to list those out which is easy enough, but list only the ones that are in either of those blogs, but ALSO some other category, say "trees"

    So the list would be all posts under parent "blogs" but also marked "trees."

    Seems simple enough, but I can't do it and I've tried some arrays and category__and and such, but this part is missing.

    thanks in advance.

  2. jesseisrad
    Member
    Posted 4 years ago #

    I've tried something like this:

    $args=array(
          'child_of' => 2194,
          'category_name'=> Chicago,
          'showposts' => 10
          );

    2194 is the ID of "blogs" parent, but it is apparently ignored when I declare the category of "Chicago", I need a way to satisfy both those requirements.

Topic Closed

This topic has been closed to new replies.

About this Topic