You have to register built-in “category” taxonomy for the “Activity” post type:
<?php
function add_categories_to_activities()
{
register_taxonomy_for_object_type( 'category', 'activity' );
}
add_action( 'init', 'add_categories_to_activities' );
See register_taxonomy_for_object_type()
in the Code Reference.
Related Posts:
- Custom post type loops with different page templates
- Template code to split a post and print a custom field?
- Function to allow single post template based on custom taxonomy?
- Conflict in function to allow single post template based on category
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- How come Featured Image isn’t showing up in my Custom Post Type?
- How to use a custom post type archive as front page?
- Set posts of a custom post type to be private by default?
- tag.php doesn’t work with tags on a custom post type post?
- Assign single template to multiple custom post types?
- Add Content to Page without shortcodes
- clients list using wordpress
- Custom taxonomy query for a custom post type
- Find callback function for custom taxonomy metabox
- Date archives for custom post type
- How can I add dropdown widget/box to admin post page?
- Template tags to display custom post type posts in category template?
- How do I create new content pages for my Custom Post Type?
- Display posts of child category in template
- custom taxonomy – Template not working
- Create separate template for shared custom taxonomy with shared terms
- Append taxonomy terms as class names in markup?
- wordpress 3.4 template files in subdirectories
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- I am trying to output portfolio items with a picture. This code doesn’t seem to be working. What am I doing wrong?
- Help with CPT template pagination
- Merge multiple custom post types in a single archive template
- GravityForm: Populate Dropdown with custom post type [closed]
- Trying to edit the single page from a Custom Post
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- WooCommerce product search titles only
- Custom Taxonomy Permalinks Redirection
- Add custom column in custom post type edit page
- Custom Post Type template stored in plugin folder not showing in post attributes dropdown
- I did group my search results by post type, but how can i give each of them its own order?
- custom post type not showing in menu
- How to clone the “Projects” Custom Post type in Divi theme
- Change CPT archive title
- I need to add endpoint for wordpress categories
- Featured image overlay when changing post status
- How to use custom template files in deeper directory?
- Hide a widget inside a div on specific type of post
- How can I get this request to use the Custom Post Type page template instead?
- Warning: Invalid argument supplied for foreach() [closed]
- Custom post type isn’t working
- custom post for slider
- How can I use archive-{post_type}.php theme template?
- Navigate posts with different post type that are in the same categories
- Show Custom Message in WordPress Admin
- How exclude or skip post type with get_next_post_link
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- Create short URL with auto 301 redirect
- Is it possible to use array_walk() to append terms to an array of posts?
- How do I assign a block template (.html) to a custom post type?
- WordPress notification if new post published
- Custom Post Type setup
- Apply template by path/slug related to custom post type?
- Custom Post Type homepage template
- Twitter Product Cards
- WP not recognizing custom post type / template
- Display Posts Query with IF function
- Excerpt length: get first paragraph
- Function to add custom HTML into head in custom post-type list page
- Set generic reservation form for custom post type
- Need help with Custom Post Types and Taxonomies
- handling templates and widgets for custom content types
- new post-type how do i retain the plugins on my sidebar?
- Custom Post Type Dashboard Tab not displaying any posts
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- Post template with breadcrumb needs to show page navigated from
- Assigning categories to custom post types via a front-end form; only works for native post type
- Default excerpt for parent of a custom post type
- Move to trash custom post type post after ACF Date Picker date is older than today
- Warning , Use of undefined constant PLUGIN_PATH?
- Load custom post type with ID in a shortcode
- WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
- Custom permalink rewrite rules – how do I fix this?
- Populate custom post type/custom fields from an external database
- How to sort custom post’s category by id from the theme’s function.php?
- Work and Display a Custom Post Type as a normal Post
- Custom Field to post_title
- How to make a custom search template for custom taxonomy?
- Custom post type with two templates
- Post Custom & Taxonomy 404 error
- How To Display Category list from Portfolio post type plugin?
- Custom Post Type tag taxonomy “Page Not Found”
- DIVs not showing correctly on CPT?
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Query custom post type and showing its content
- Load different template for CPT (in loop) in my plugin?
- Search page for custom post type
- Template with Custom Post Type (Custom Tables) does not work
- Allow authors to create article image
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- Navigation links to posts in current term shortcode
- CPT Template Option to Top
- How to create custom page templates with default page layout framework?
- Comments are not working on Custom Post Type
- How to use wp_set_object_terms depending on page ID?
- How can I produce multiple webpages with a different output based on one entry/Page/custom Page?