Support » Fixing WordPress » As I list posts only if you have two or more categories?

  • If a post you have marked on the category and category C list them.
    How can I do this using wp_ functions?

Viewing 1 replies (of 1 total)
  • How I solved that easily.

    Category A = ID 2 and NAME A
    Category B = ID 3 and NAME B

    if i use:
    query_posts( ‘cat=3&cat=2‘ );
    or
    query_posts( ‘category_name=A&category_name=B‘ );

    it will list all the threads of both categories.

    But if I use this:
    ID + Name
    query_posts( ‘cat=3&category_name=A‘ );

    It only lists when the two is true.

    Still need help to find out if this is the correct way.

Viewing 1 replies (of 1 total)
  • The topic ‘As I list posts only if you have two or more categories?’ is closed to new replies.