Support » Fixing WordPress » Children posts from multiple categories

  • Hello everyone!

    Going to “” I can display all the posts that are under category “my_city” AND under category “restaurants”.

    Let’s assume that restaurants category has several childs (thai, italian, etc): how can i make a list of all children subcategories of restaurants that are ALSO and ONLY under my_city category?

    For example “”

    For the moment this is the code in my category.php file:

    $this_cat = (get_query_var('cat')) ? get_query_var('cat') : 1;
    $this_category = get_category($this_cat);
    if ( $this_category->parent ) { $this_cat = $this_category->parent; }
    wp_list_categories('title_li=&child_of=' . $this_cat . '');

    The results is a list like “thai, italian, etc” (that apparently is good), but the links are all pointing to something like “”, showing ALL restaurant, not only those under my_city.
    Obviously I’m not catching the other category and don’t know how to do the right array.

    Thanks a lot in advance for your help.

  • The topic ‘Children posts from multiple categories’ is closed to new replies.