• I’ve read this thread, and I’m hoping that someone can give shed a little more light on this subject for me, as I really don’t want to use tags if I can avoid it. My client only barely understands categories, and I’m not sure how to force the use of tags rather than categories. Since a post cannot be posted without a category, it seems easier and more logical for my client to use categories.

    However, I understand that tags are being implemented into more plug-ins and even in the WP backend, so I’d like to know if I’m just beating my head against categories for no good reason as well. Basically, if tags are going to be easier to use in future releases of WP, I’d like to know so I don’t waste a bunch of time hacking my templates to show multiple categories.

    With all that being said, let me tell you a bit about my problem.

    My client has an exotic animal ranch, whose website we run using WP. She has categories for each type of animal she owns as well as categories for “For Sale,” “Herdsires,” and “Information.” In a normal (unhacked) version of WP, when someone goes to the “Horses” category page, they will see all posts categorized as “Horses” in chronological order. What we need is a Horses category page that shows all the “Horses” posts, but then shows all the posts ALSO categorized as “For Sale” together. Likewise, if someone goes to the “For Sale” page, we’d like it if those posts were also categorized according to another category, so all posts that are “Horses” and “For Sale” come up together rather than chronologically.

    I’ve done this a couple of ways, all of which seem difficult and inefficient. I tried using a page for the “Horses” category, but since I still had to have a loop in it, it seemed a dumb idea.

    At the moment, I accomplish this using multiple loops, and I’m sure that’s the way to do it, but the loops don’t always behave. I find that I have to use some strange hacks that I don’t quite understand to get things to work the way I want them to, but not only do I not understand why they work (which is unacceptable to me), they don’t always work as intended. (I’m learning PHP, and I can say that I understand the theoretical basis behind database structure, but I am rather limited in the implementation of it. And by learning PHP, I should specify that I’m learning the PHP specific to WordPress.)

    I suspect this is because you can’t make logical unions/intersection/exclusions out of categories (as referenced in the above linked thread and elsewhere on the Codex) like you can tags, but this seems asinine to me. Why can’t I just tell WP that I want to show all posts categorized as “For Sale” but then I want those posts to be sorted by another category?

    If you’d like to see what I’ve done already, with some obvious design flaws, please feel free to view the website. (The first page is static.) Not only is it difficult to change things around in the backend for me, it seems like it takes a long time to query things, which I suspect is the result of using multiple loops, sometimes as many as 6. (Please don’t flame me!) Since this website is in its baby stages, I don’t want this to become a huge issue when she’s got 500 animals up there; I’d rather find out the problems now and fix them so I don’t have to redesign the whole template structure later. I’d also like to avoid the use of multiple loops if possible, because it seems rather awkward to forgo all the hard work that the WordPress database is designed to do for you just to hack a few things.

    If you need more information or if you’d like to see some of my template files, please don’t hesistate to contact me directly. Or if someone has some time on their hands and wants to write a plug-in, my client would be willing to discuss compensation.

    Thank you WordPress forums; I look forward to picking your brains yet again. =)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello there,

    I have a very similar issue, just that I would like use different pages and only a single category per page, however many loops to separate.
    This all works fine, however, the post behaves as it if can only exist in one category, and thus this only works once. The post thus doesn’t really exist in all the categories/loops. It’s as if one of them had already picked out the post and the others can’t ‘grab’ it anymore.

    Anybody got an idea or does the original poster have a solution meanwhile?

    This sounds exactly like an issue I am facing now. Has anyone found an efficient or feasible way to accomplish this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Yet another multiple categories question’ is closed to new replies.