You can use register_taxonomy_for_object_type()
to use a taxonomy with a post type, without having to touch the post type registration code, example:
function wpa_categories_for_events(){
register_taxonomy_for_object_type( 'category', 'tribe_events' );
}
add_action( 'init', 'wpa_categories_for_events' );
To have events appear on the category pages, I believe you have to modify the default category queries via pre_get_posts
to add custom post types, by default they only query the post
post type.
function wpa_events_on_category_pages( $query ) {
if ( $query->is_category() && $query->is_main_query() ) {
$query->set( 'post_type', array( 'post', 'tribe_events' ) );
}
}
add_action( 'pre_get_posts', 'wpa_events_on_category_pages' );
Related Posts:
- How to make a list of companies’ information and display them to user, using custom post types and a custom taxonomy?
- Add .html extension to custom post type taxonomies
- remove custom taxonomy metabox form custom post type
- How to Build a Movie Library in WordPress 3.x
- Custom Post Type causes Page Not Found
- Plugin allowing for artists, events and venues
- custom taxonomy and custom post type url conflict
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- List taxonomy terms for post as checkboxes
- ‘No Results Found’ on single post for custom post type
- auto populate list of questions if user select a category xyz
- “Custom Post Type Permalinks” plugin URL strcuture
- WordPress custom taxonomy not showing
- Rename existing cpt and taxonomy with new textdomain
- how to create hierachial taxonomy and manage under single post type?
- Need to edit author permissions | custom taxonomy
- Adding category base to url in custom post giving 404?
- Cannot view Custom Post Type no matter what I try
- CPT-onomies CPT_TAXONOMY->get_terms extremely slow with 6K posts
- How to list the categories by custom taxonomy created?
- Display Custom Post Type and Custom Taxonomy Data on Front End Using Only a Plugin
- Failed to update a post when I add a taxonomy to it
- Implementing a CrunchBase.com Clone using WordPress?
- Custom media upload content for inserting custom post shortcode
- WP_query parameters for date range
- Use a plugin to handle custom post types?
- Custom Taxonomy in plugin and template
- Register Custom Post Type from Plugin
- How to load a new template page according to a particular URL?
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- How to get the custom page get_permalink?
- Updating post meta for custom post types
- Template for custom post type shows all posts instead of just one
- How to delete terms on plugin deactivate?
- Best practice for adding posts in bulk
- Frontend editing, Frontend user dashboard
- Override plugin with functions.php
- how to add extra meta box or textarea into custom post types
- Should i delete the posts created by a plugin on uninstall?
- Show Heirachy of categories in WP Download Monitor
- How does WP handle multiple matching rewrite rules?
- Saving Custom Post types and fields to a custom table
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Building a store locator with google maps
- How to make wp_enqueue_style and wp_enqueue_script work only on custom post type
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- Limit Number of Taxonomy Terms (Images) Displayed
- Widget for adding HTML markup to a page
- How to create user groups and allow custom posts and plugin modify/access to specific group?
- Correct way to make meta box with more than one meta field secure
- I want to extend the current themes’ single.php to display the meta fields of my CPT
- How can I create a custom shortcode that will return a custom post type by ID?
- All of my custom posttypes are 404’ing
- more types plugin – display all post of post type on page
- Making a Template for a CPT created by a plugin
- Calendar Plugins – Featured Widget [closed]
- Custom Post Type Fields
- Custom setup of wordpress comments that are displayed
- publish_post action doesn’t work
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- custom post type don’t appear in the home page
- WP_Query for custom post type and category_id not working
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- How to get CPT category checkbox list and show post of selected(multiply) checkboxes via ajax?
- Preview with Custom Post Type Not Working
- Custom Template for wordpress cpt plugin
- Custom Post Type template for homepage
- Get product categories and add them to a custom taxonomy
- Best method of implementing compartmentalized custom post types on a multi-site network
- How to search post titles with whole words only, but not the exact word only?
- Remove custom taxonomy name from the slug – Custom Post Type UI
- Display posts by alphabetical order
- Can i stream data to a custom_post_type?
- Is there a hook similar to “save_post” which only fires AFTER the post is completely published?
- save_post hook partly firing in update post
- custom post type get_posts() function not work
- Create multiple posts when a custom post is created
- Page not found after creating the add new post slider using custom post type
- Is it possible to arrange Custom Post Types from CPTUI into a Folder?
- Filter Custom Post Type Posts by Taxonomy
- Insert custom taxonomy into category query
- Taxonomy Category Icon on index page
- Get only selected custom taxonomy
- Plugin Error on activating
- “Tree view” for wp_dropdown_categories() markup
- Show similar category portfolio items?
- Plugins for putting Custom Post Types into the Menu
- Custom Post type plugin breaking the front page shows dashboard?
- Insert data in custom table during new post creation
- Top Contributors Plugin with Custom Post Type
- How can i do custom author list?
- Award points if a specific custom taxonomy is selected – Cubepoints
- featured image problem with custom post type
- Is an Office a custom post type [closed]
- How to Create Short Code Using Custom Post type
- ACF Taxonomy Object term Null [closed]
- Snippet displaying LearnDash parent course title with lesson title [closed]
- Filter custom post type returned from REST api
- Wrong block appender button showing
- Select posts from list and add them in a new list