All what you need to do is just pass required post types as array in the second parameter for register_taxonomy
function call:
add_action( 'init', 'wpse8170_init' );
function wpse8170_init() {
register_taxonomy( 'my-taxonomy', array( 'post' ), array(
...
) );
// or call this function if your taxonomy is already registered
register_taxonomy_for_object_type( 'my-taxonomy', 'page' );
}
Related Posts:
- Query Posts by Custom Field ‘Price’
- remove custom taxonomy metabox form custom post type
- How to Build a Movie Library in WordPress 3.x
- Show Heirachy of categories in WP Download Monitor
- Getting a List of Categories for Use in a Plugin?
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- WordPress category add image field
- Where (or when) should I register a new taxonomy?
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- How to set taxonomy in custom plugin?
- WP_Terms_List_Table Quick Edit not working
- Ordering taxonomies by rank
- Redirect to another page using contact form 7? [closed]
- Default taxonomy template in plugin, override in theme
- Best/Correct way to add an option to a category
- How to add category and subcategory in WordPress custom code?
- How can i listing current category and Featured Category post list?
- How to get Recent Post From Each Category with Thumbnail?
- Add a new category for posts
- Need to edit author permissions | custom taxonomy
- How to overwrite the category template in a plugin
- Visual composer custom element error
- Display posts by alphabetical order
- How to display the category name in the tab and post inside the tab in WordPress?
- Getting the same post on my related post
- Cannot view Custom Post Type no matter what I try
- Taxonomy Category Icon on index page
- View more posts of a sub-category
- How to insert category name above post title in a featured pages plugin?
- trying to create simple plugin to filter categories from all authors
- Filter EVERY category link with my plugin
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- wp_insert_post_data filter to set category
- Create WordPress category dynamically
- Does a plugin’s “main” file need to be named the same as the folder containing it?
- Customizing subject in comment notification e-mails
- enqueue script only if it is not already enqueue
- How can I limit functionality in one version of a plugin?
- Plugin child folder?
- merging an array to an existing array using add_filter
- Custom Taxonomy Tag Search
- Retrieving plugin options value saved through setting
- How to slice an array using posts_per_page? [closed]
- Trouble with editing template for “List category posts” plugin
- Enqueue WordPress plugin scripts below all other JS
- woocommerce payment gateway callback not firing [closed]
- White page by using filter template_include
- How to export post 2 posts WordPress plugin data [closed]
- Customization API for plugin development
- User switching only with specific role and return
- Fromcraft Plugin On click submit button [closed]
- Adding Font Awesome to WP Plugin
- Display custom content using page.php from theme
- WordPress error: Options page Setting_ not found in the allowed options list
- Translations for my plugin don’t show up
- flush_rewrite_rules() not working with update_option_{$option}
- How to ignore extra whitespaces in translation functions like _e?
- How does translation (gettext) work for translating config file of plugin?
- how to add a comment button to be displayed only for the posts in the home page [closed]
- The “Child Pages Shortcode” plugin, block template
- How to get a custom page through plugin?
- can’t unzip file
- WooCommerce – I want to add functionality of one plugin to another plugin — best approach?
- Want to create custom design of progress indicator in wpforms
- Custom Post Type same name as Category
- How to display the custom post related blog by category?
- WP Forms not displaying,becomming an fatal error
- How to create a page with the selected template after activating the plugin
- I enabled debugging but I still get the same message: There has been a critical error on your website
- wp_mail function not working in WordPress Plugin Boilerplate
- When/where would want to attach other classes to the base class in a WordPress plugin?
- Using foreach loop for `$instance` of form and update array widget iteration
- Could someone maybe point me in the direction of a decent tutorial on how to create a wordpress plugin that is compatible with another plugin please?
- Custom plugin which downloads updates from custom endpoint, extracts new version zip into a new name
- wp meta_query meta_value compare =REGEXP delimited by space
- Create shared actions for admin and users with plugin bolierplate
- How to insert variable which contain array value in wp_options table?
- How to Insert images in WordPress using code
- shortcode which is introduced into entry the blog, and appears in side bar
- Multiselect value in wp_query
- How to Overwrite validate_plugin function
- how to load a file from a plugin when a url is passed
- Is it possible to cancel a post status transition?
- Retrieve post thumbnails
- 404 not found problem with URL rewrite custom category
- Automatically set posts to NoIndex depending on category?
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- wordpress Ajax success doesn’t return the value
- How to create a “plugin” or “block” that can manipulate WordPress DOM in frontend?
- Take Elementor For Email FIeld Check if user is registered. IF not registered then register on woocommerece
- Template selector for woocommerce product
- How to access values from your own settings page in javascript?
- How to load plugin static data from cloudfront
- How to Replicate Elementor Licensing Model
- How do I save meta key value in the save function?
- How can I view forums from different sites in a single panel? [duplicate]
- The Best Multilanguage Plugin supporting the FSE [closed]
- warning wp session
- How to add portfolio category post count in main navigation menu?
- Redux Framework slides field – How Can i add new placeholder Filed? [closed]