
The Minimum Theme for the Genesis Theme Framework includes a custom post type to create a portfolio. If you would like to create categories for that portfolio, you can create a custom taxonomy. Following this tutorial, will give you a method of categorizing your portfolio images.
Step 1: Find the following code in your functions.php file:
/** Create portfolio custom post type */
add_action( 'init', 'minimum_portfolio_post_type' );
function minimum_portfolio_post_type() {
register_post_type( 'portfolio',
array(
'labels' => array(
'name' => __( 'Portfolio', 'minimum' ),
'singular_name' => __( 'Portfolio', 'minimum' ),
),
'exclude_from_search' => true,
'has_archive' => true,
'hierarchical' => true,
'menu_icon' => get_stylesheet_directory_uri() . '/images/icons/portfolio.png',
'public' => true,
'rewrite' => array( 'slug' => 'portfolio' ),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo' ),
)
);
}
Step 2: Replace that code with this:
/** Create portfolio custom post type */
add_action( 'init', 'minimum_portfolio_post_type' );
function minimum_portfolio_post_type() {
register_post_type( 'portfolio',
array(
'labels' => array(
'name' => __( 'Portfolio', 'minimum' ),
'singular_name' => __( 'Portfolio', 'minimum' ),
),
'has_archive' => true,
'hierarchical' => true,
'menu_icon' => get_stylesheet_directory_uri() . '/images/icons/portfolio.png',
'public' => true,
'rewrite' => array( 'slug' => 'portfolio' ),
'taxonomies' => array( 'portfolio-type' ),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo' ),
)
);
}
/* Register Portfolio Taxonomy */
add_action( 'init', 'create_portfolio_tax' );
function create_portfolio_tax() {
register_taxonomy(
'portfolio-type',
'portfolio',
array(
'label' => __( 'Type' ),
'hierarchical' => true
)
);
}
Step 3: Copy the archive-portfolio.php template from the child theme folder and save it as taxonomy-portfolio-type.php
Step4: Go to Settings > Permalinks and resave
Step 5: Go categorize some portfolio images! Then view your category at http://yoururl.com/portfolio-type/category-slug/








