I’d set them up as custom taxonomies and attach them to the post type that you’re using for the projects. That way they’re all set up the same was as categories, and will all have archive pages available in the same way.
Thanks. Can I have both categories and custom taxonomies in a post? I use the default post type.
Taxonomies are a form of categories, why don’t you just do the whole structure in your custom taxonomy.
As potentdevelopment said, Categories are just a Taxonomy, and you can add extra taxonomies to any post type that you like, as well as adding as many as you like to the standard post type(s). As an example…
register_taxonomy( 'country', 'post', array ('label' => 'Country') );
You can create non-hierarchal tag-like custom taxonomies for each field.
Country, Year, Material, Status.
Then, you can pre-populate within your theme’s functions.php file the most common fields to be ready for use.
As a rule of thumb I tend to use Taxonomies when I want to group posts by a specific criteria.
And custom fields when I want to sort or filter a certain post-type by these fields.
I think in your case, using custom-taxonomies would be the way to go.
You’l benefit from their built-in url structure and ease of use.
Furthermore, in the future if you’l want to filter by multiple taxonomies, for example:
Projects in Australia built with Wood in 2006.
It would be easy to implement if you used taxonomies.
wow, thanks. it works. I used this code to register the custom taxonomy
add_action( 'init', 'create_material_taxonomy' );
function create_material_taxonomy() {
$labels = array(
'name' => 'Materials',
'singular_name' => 'Material',
'search_items' => 'Search Materials',
'all_items' => 'All Materials',
'edit_item' => 'Edit Material',
'update_item' => 'Update Material',
'add_new_item' => 'Add New Material',
'new_item_name' => 'New Material Name',
'menu_name' => 'Material',
'view_item' => 'View Material',
'popular_items' => 'Popular Materials',
'separate_items_with_commas' => 'Separate materials with commas',
'add_or_remove_items' => 'Add or remove materials',
'choose_from_most_used' => 'Choose from the most used materials',
'not_found' => 'No materials found'
);
register_taxonomy(
'materials',
'post',
array(
'label' => __( 'Material' ),
'hierarchical' => true,
'labels' => $labels,
'public' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'show_admin_column' => true,
'rewrite' => array(
'slug' => 'materials'
)
)
);
}
I have also installed this plugin to filter multiple taxonomies: https://wordpress.org/plugins/search-filter
thank you very much! 🙂