This is going to seem like a stupid question but I can’t find documentation that is specific enough for me. In short form, what I want to know is, what is the “first category” for a post that has more than one category? Is it the first category that was assigned to that post? Is it the category with the lowest ID assigned to the post? If one adds many categories to a post before clicking “save”, which is the “first category”?
I need to know because it could potentially make setting up a newsletter I’m working on a lot easier. The newsletter is released in issues. I think it makes sense to use categories for my organization into categories, rather than tags — so “Issue 12” would be a category, as would “in every issue” and “featured” whereas tags would be based on the content of a given article, like “job searching” or “cupcakes”.
So I need to assign articles [posts] to multiple categories. But I also want to have the navigation bars etc on single post pages link other articles in the same issue, so I’ll need to get the issue category that a given post is assigned to. If I can do this by assigning the issue category before assigning any other category, that would be simple. Another possible way (I guess) is trying to return the category by name which includes the string “issue”, get the ID of this category, and find all the other articles in that category. But this sounds like it would be less possible than just adding categories in a given order.
I hope that makes sense. Using wordpress 2.6.2.
- The topic ‘What is the “first category”?’ is closed to new replies.