• Hi gang,
    While poking around for this post, I discovered that WP does handle multi-category listings when you feed it ?cat=23,54,76 but does so with (I think) an OR logical operand.
    In other words, it returns posts categorized as any one of the requested categories.

    My needs are bit more elaborate… First of all, I’d like the above example to return *only* posts categorized as *all* the requested categories (post is categorized as 23, 54 and 76. If not, I don’t want it.)

    Further, and this is where it gets really tricky, at least too tricky for me right now, I’d like to mix and match both logical operands.

    for example I’d liek all posts that are categorized as 23, and either 54 or 76 (23 and 54, 23 and 76, and –if existent– 23, 54 and 76)

    This means introducing logical operators in the query string and parsing them out right?

    ?cat=23-AND-(54-OR-76) or some such.

    For now I;’d settle for the first one though… any ideas? Any existing plugins? I’m willing also to forgo pretty URLs for this feature (i.e. no .htaccess rules required.. dealing with /categories/china-OR-india-AND-free_speech … )

Viewing 1 replies (of 1 total)
  • bopuc, did you ever figure out an answer to your delimma? I am looking to also call up an intersect of multiple categories (not quite as tricky are yours) and then set within a give time frame. So far I haven’t lucked out…

    If you have found an answer I’d appreciate a little push in the right direction! Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Loop hack/replacement with logical operands for multicategory listings’ is closed to new replies.