Assuming that your post type is registered as albums, you can add a custom taxonomy to the post type as follows:
add_action( 'init', 'create_album_taxonomy' );
function create_album_taxonomy() {
register_taxonomy(
'albumtype',
'albums', // content type here
array(
'label' => __( 'Album Type' ),
'rewrite' => array( 'slug' => 'albumtype' ),
'hierarchical' => true,
)
);
}
Place this in your functions.php. Hope this helps
Related Posts:
- Setting Custom Sort Order of Posts within a Category
- How to change the layout and styling of posts according to their category in WordPress?
- Add default content to post (for specific category)
- Show One Category on Post
- Add custom field to category of custom post type
- Do I use custom post type or something else?
- Custom Theme Want To Remove One Category From All Displays
- Edit custom post type admin menu link
- Deleted category by mistake, all posts now have categorized category. Can i revert that?
- How can i limit the number of posts created per category?
- WordPress custom Query for Posts in Category display posts multiple times
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Set Default Category to Username
- if in category but only with post meta
- How to call posts under a specific category on static front page?
- Static pages not working
- How to display only one category in a custom post type?
- Can I style single post that are in multiple catergories?
- Custom post styling per category?
- Show custom post category for single post
- Static text above category page
- Show a Category Specific Info Box
- Add default content to post (for specific category)
- Display ONLY Latest Post From Several Categories
- Taxonomy Category category.php not working
- Post’s arent displaying
- Only show posts belonging to multiple cateogries at same time
- I have a website issue I am trying to resolve
- How to display related posts from same category?
- Find out who deleted a page or post?
- Display all posts from specific categories on a page
- How to disable Uncategorized category URL?
- Add role that restricts user to post in specific category
- Count posts in category including child categories
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- Archived Posts in Wrong Category
- Custom post type single (permalink) throws a 404 error
- Display all posts under child sub category in sidebar on post page?
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- How do I get the slug of a custom taxonomy category of a post?
- if custom post type exist
- Authors in menu, template list post by author
- Get post id in wordpress action?
- Count to how many categories a post belongs to
- Remove slashes (both before and after) in relative post url
- How can I remove posts of a certain category from homepage after a specified time period?
- How to include a post type in the admin/backend?
- Using wp_list_categories like the the_category (showing just current categories of a post)
- Should I use posts or pages in this scenario?
- Adding custom fields to bbpress reply form
- How to allow users to post only in certain category and hide elements from edit page?
- Need help with category listing!
- Prepending %category% onto default posts fails
- List all categories with featured image from post?
- Permission issue with custom post type – not added to menu – by plugin
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- How to make the first post in the loop be styled like a “new / featured” post?
- Is it possible to customize the post according to post format in single.php?
- How to create a “latest news” page showing a list of posts from blog category
- Display the 2nd category name of a custom post type without error if its null?
- Querying another post category to match current post and display in loop
- How to have more than one page for your posts if you have 8 posts but can store max 4 on a page
- Extract wordpress posts content and category content
- All categories displays the same posts
- Having pages after specifying post_type post
- datepicker value in mysql
- How to show a featured image inside a post in only 1 single category
- How to restore deleted post related with deleted users
- Highlighting Current Category in the Archive and Feeds page
- WordPress Post Deletion Issue
- Display most recent posts in category with Twenty Ten theme widget
- How Can I Always Display A Particular Post First Using WP_Query?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Change modified date to current date when title updated automatically
- How to put the author of the post in the comments?
- How to add a custom class attribute into code wrapper? [duplicate]
- Redirecting wordpress search query to archive page
- Does having category name in permalinks affect SEO when having a post in multiple categories?
- How to display related post from same category in single.php
- Save All Post Permalink From A Specific Category into a .txt file
- show image gallery in archives or category page
- get current index of post content in category page
- Dynamically load posts based on category
- Get Categories & Posts With Type Article
- Nothing appears using get_the_excerpt() in category.php
- Append a random string to a post permalink
- Custom Post Type doesn’t use single.php or single-{custom_post_type}.php
- Unable to uncheck a category in a post
- Next/Prev category post in same button
- Customize search results to include custom posts and display in a specific template page
- Custom permalink based on custom post type fields
- Show category post with excerpt text
- How to show different categories in different pages?
- How to only allow post to be deleted if custom field doesn’t exist
- How to set a link to custom archieve page
- Older entries link within a category page
- Custom Post Title as search term
- each user having category with their name and can add sub categories post in that category
- Can’t assign another category other than Uncategorized int he following front end post submission form?
- Best way to enable sorting by 3 criteria on a page of listings