Showing parent category, but not children. (2 posts)

  1. misterpatrick67
    Posted 4 years ago #

    Hi all,

    trying to figure out how to do this. I have a parent category of featured items for the homepage. I only want to show items that are in the parent category *and* a child category. I have the structure like this as there is an archive page for the various children once they are no longer featured on the homepage. Structure is like this:

    Homepage (Parent and ID4)
    cat 1
    cat 2
    cat 3

    <?php query_posts($query_string . '&cat=4' . '&orderby=rand' . 'showposts=6'); ?>


  2. vtxyzzy
    Posted 4 years ago #

    This may do what you want (UNTESTED):

    [Code moderated as per the Forum Rules. Please use the pastebin]

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.