• Hi,

    so i’m on a category page, and i would like all posts that are in sub categories to be listed, and separately i would like all posts that are NOT in a sub category listed…

    so my wp structure would look like:

    ? SHOP
    – Featured Product
    – Offer 1
    – Offer 2
    ? ? Products
    – – Item 1
    – – Item 2
    – – Item 3

    So one part of the page needs to list all posts within a subcategory of the current category (in this case, everything within products), and another bit of the page needs to list the posts which are NOT within a sub-cat (featured product, offer 1, offer 2)

    is this possible?

    in english it would be “list posts within any subcateogory of the current category” and the other part of the page needs to be “list posts directly within this category but NOT in a subcategory”

    make sense? (probably not) – any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m confused by your category structure. Does “? ? Products” have a Parent category, and if so what?

    Thread Starter sootylad

    (@sootylad)

    sorry yeah it was hard to explain… products is a sub cat of shop, item 1, 2 and 3 are within the products sub cat, and featured, offer 1 and offer 2 are directly within the shop main cat…

    i’m sure theres a better way of portraying it but i couldn’t think of one :p

    Is this right?

    SHOP (no parent category designated)
    -Featured Product (parent = SHOP)
    -Offer 1 (parent = SHOP)
    -Offer 2 (parent = SHOP)
    -Products (parent = SHOP)
    –Item 1 (parent = Products)
    –Item 2 (parent = Products)
    –Item 3 (parent = Products)

    Just as a note, that by WordPress standards, ANY category that has been designated a Parent category, is not meant to be checked in the Category hierarchy when writing posts. Meaning, only the lastest generation category should be checked. So you would NEVER check ‘SHOP’ or ‘-Products’, when writing a post that is being assigned the ‘–Item 3’ category.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Listing posts only in subcategories’ is closed to new replies.