WordPress.org

Ready to get started?Download WordPress

Forums

Advanced customization of category archive pages (2 posts)

  1. jayant
    Member
    Posted 5 years ago #

    I have the following category structure:
    CatA
    CatB
    CatC
    CatD
    CatE

    At the category archive page of lets say CatA, I wish to show posts which belong to CatA but must not have CatB, CatC as categories. I don't care about CatD or CatE.

    so essentially a post having the following categories:

    CatA - shown
    CatA,CatB - not shown
    CatA,CatC - not shown
    CatA,CatD - shown
    CatA,CatE - shown
    CatA,CatB,CatC - not shown
    CatA,CatC,CatD - not shown
    CatA,CatC,CatE - not shown
    CatA,CatB,CatD - not shown
    CatA,CatC,CatD - not shown
    CatA,CatD,CatE - shown
    CatA,CatB,CatE - not shown
    CatA,CatC,CatE - not shown
    CatA,CatD,CatE - shown
    ....
    ....
    and so on

  2. jayant
    Member
    Posted 5 years ago #

    Are we allowed to do something like:
    query_post("cat=1,-2,-3")

    So I get back results which belong to atleast cat1 among other but do not belong to cat2 or cat3.

Topic Closed

This topic has been closed to new replies.

About this Topic