As many of you know I’m doing some WordPress work and I’m bumping heads with the same issue over and over again… so I’m turning to my very smart, very resourceful and very helpful wordpress friends who I’m happy to suck up to in order to get help with the bane of my existence – CATEGORIES!
Here’s the thing: I want a predictable way to know which category is going to show up dominate for a post if I assign 2 categories. Clarification: which category will be used in permalink if 2 are assigned.
WordPress sucks at this and seems to be aggressively inconsistent or at least if it's consistent I can't figure out the logic. (I will concede that it’s possible I suck, but my math degree does imply I have some skill in the logic area. (Math degree → logic skilz, Math degree spelling skilz)
An example: I have a post about a dish, I have things set up to show the post's category in the excerpt and to have it used in the permalink filed under that category, so it’s important I can control which category dominates if there are 2 assigned. Say a post about Poutine (category: Dish) where I recommend 2 restaurants (so I also want it to show up in the category Reco).
I want the permalink to use Dish not Reco.
Since Reco is a new category I added today, based on what I thought WP logic was (assign dominate category by oldest added to WP->;newest category) Dish should dominate. It doesn't. (But the reverse logic has been disproven in previous posts) It's not alphabetical. It's not hierarchical (where highest in the category hierarchy dominates). It's getting me down.
So… any way we can assign a "dominant category"? Essentially force WP's hand and use what I tell it to use?
I do this for indexing in CheapEats (I know, totally different tech) but it's a great way to avoid your tech making your content producer it's bitch.
(and yes, I am posting this on a typepad blog. Shhhh)