dinko1
asked on
Define "area" in each wordpress post
In a wordpress site, I have the need to assign an "area" for each post. Areas has three levels. City -> Position -> Area like "Athens -> Center -> Sintagma". Users must be able to filter all "Athens" or all "Center" or specifically all "Sintagma" posts. What is the best way to do it? Adding a custom field? Please explain with as many details as possible. Don't forget that I need to use this and filter posts. Also, if I have to pay for a commercial plugin its ok with me. I prefer to have everything setup in control panel, I dont like to write custom php code.
Why not just use categories?
ASKER
This is the "as much detail as possible" answer? :)
Also, I already have a "Category" for each post like "Beauty", "Spa", "Hair", "Auto-Car" etc...
Also, I already have a "Category" for each post like "Beauty", "Spa", "Hair", "Auto-Car" etc...
This is the "as much detail as possible" answer? :)
1. Wasn't an answer so much as a clarifying question :)
2. It's not the length, it's how you apply it.
Also, I already have a "Category" for each post like "Beauty", "Spa", "Hair", "Auto-Car" etc...
So? Have more than one category (it's supported). One set of top-level categories for things like Beauty, Spa, etc. and a second tree of hierarchical categories:
City
- Position
-- Area
By placing a post in the "thing" top level category and also in the lowest level of the hierarchy above (e.g. "Beauty" and "Sintagma") you get two URLs for that post:
yourdomain.com/beauty/post
yourdomain.com/athens/cent
and can then look into plugins that do front-end filtering by category...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's not necessarily the "right" way so much as it's the "other" way to do it. You can have custom taxonomies set up that do hierarchical sorting or just extra "categories" but the net effect is the same.
ASKER
Much like the built-in Categories and Tags, custom taxonomies allow you to define an organization within your custom post types. It works just like the regular categories, but is so much better because you get to define the exact name your taxonomy uses.
Taxonomies can be used to organize the display of your content on the front-end of your website as well, they are not just for administration. This means that your website becomes much easier to navigate for your users!
That is why Wordpress crew invented "Taxonomies" a different approach of the "Categories".
Taxonomies can be used to organize the display of your content on the front-end of your website as well, they are not just for administration. This means that your website becomes much easier to navigate for your users!
That is why Wordpress crew invented "Taxonomies" a different approach of the "Categories".
ASKER
taxonomies is the right way to define custom categories in Wordpress