Этот плагин не тестировался с последними 3 основными выпусками WordPress. Скорее всего, он уже не поддерживается и может быть несовместим с текущими версиями WordPress.

CPT-onomies: Using Custom Post Types as Taxonomies


CPT-onomies is a multisite compatible WordPress plugin that allows you to create very powerful taxonomies and, therefore, very powerful relationships between your posts.

CPT-onomies are Custom-Post-Type-powered taxonomies that function just like regular WordPress taxonomies, even allowing you to use core WordPress taxonomy functions, such as get_terms() and wp_get_object_terms(). Check out the CPT-onomy documentation to see which core WordPress taxonomy functions work and when you’ll need to access the plugin’s CPT-onomy functions.

CPT-onomies includes a custom post type manager, allowing you to create custom post types and register CPT-onomies without touching one line of code!

If you’re running a WordPress multisite network, you can register your custom post types/CPT-onomies across your entire network OR on a site-by-site selection. All from one screen!

If you’re already using a plugin, or theme, that creates custom post types, don’t worry, CPT-onomies is all-inclusive. Any registered custom post type can be used as a CPT-onomy.

What Is A CPT-onomy?

A CPT-onomy is a Custom-Post-Type-powered taxonomy that functions just like a regular WordPress taxonomy, using your post titles as your taxonomy terms. «Attach», or register, your CPT-onomy to any post type and create relationships between your posts, just as you would create taxonomy relationships. Need to associate a CPT-onomy term with its post? No problem! The CPT-onomy term’s term ID is the same as the post ID.

Is CPT-onomy An Official WordPress Term?

No. It’s just a fun word we made up.

Need Custom Post Types But Not (Necessarily) CPT-onomies?

CPT-onomies offers an extensive, and multisite compatible, custom post type manager, allowing you to create and completely customize your custom post types within the admin.

Why CPT-onomies?

It doesn’t take long to figure out that custom post types can be a pretty powerful tool for creating and managing numerous types of content. For example, you might use the custom post types «Movies» and «Actors» to build a movie database but what if you wanted to group your «movies» by its «actors»? You could create a custom «actors» taxonomy but then you would have to manage your list of actors in two places: your «actors» custom post type and your «actors» taxonomy. This can be a pretty big hassle, especially if you have an extensive custom post type.

This is where CPT-onomies steps in. Register your custom post type, ‘Actors’, as a CPT-onomy and CPT-onomies will build your ‘actors’ taxonomy for you, using your actors’ post titles as the terms. Pretty cool, huh?

Using CPT-onomies

What’s really great about CPT-onomies is that they function just like any other taxonomy, allowing you to use WordPress taxonomy functions, like get_terms(), get_the_terms() and wp_get_object_terms(), to access the CPT-onomy information you need. CPT-onomies will also work with tax queries when using The Loop, help you build custom CPT-onomy archive pages, allow you to programmatically register your CPT-onomies, and includes a tag cloud widget for your sidebar. Check out the CPT-onomies documentation for more information.

If you’re not sure what a taxonomy is, how to use one, or if it’s right for your needs, be sure to do some research. The WordPress Codex page for taxonomies is a great place to start!

Note: Unfortunately, not every taxonomy function can be used at this time. Check out the CPT-onomy documentation to see which WordPress taxonomy functions work and when you’ll need to access the plugin’s CPT-onomy functions.


  • CPT-onomies offers an extensive custom post type manager, allowing you to create new custom post types or use custom post types created by themes and other plugins.
  • CPT-onomies lets you manage and customize your custom post types without touching one line of code.
  • Create your custom post types to power your CPT-onomy.
  • Assign your CPT-onomy terms just like any other taxonomy.
  • The admin allows you to sort and filter your posts by CPT-onomy terms.


  1. Upload ‘cpt-onomies’ to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to Settings > CPT-onomies
  4. Create a new custom post type or edit an existing custom post type
  5. Register your custom post type as a CPT-onomy by «attaching» it to a post type, under «Register this Custom Post Type as a CPT-onomy» on the edit screen
  6. Use your CPT-onomy just like any other taxonomy (refer to the CPT-onomy documentation for help)

Часто задаваемые вопросы

Why does CPT-onomies not work with all of the WordPress taxonomy functions?

Good question. While CPT-onomies strives to mimic taxonomy functionality as much as possible, CPT-onomies are not stored in the database in the same manner as taxonomies. The simplest answer to «Why not?» is that I believe my current method of «not duplicating post information to resave as taxonomy information» is in the best all-around interest of not only my plugin, but also your web site. With that said, I am constantly searching for new ways to «hook» into WordPress to improve CPT-onomy/taxonomy integration and, when impossible, will continue to provide workarounds.

How do I associate a CPT-onomy term with it’s matching post?

Another good question, with a very simple answer: the term ID. CPT-onomies return the same information as taxonomies, including a term ID. A CPT-onomy term’s term ID is the same as its post’s post ID.

I’m not able to save my custom post type because the page keeps telling me «That post type name already exists.»

This is a jQuery «bug» that only seems to plague a few. I’ve noticed that this validation standstill will occur if you have any text printed outside the <body> element on your page. If that’s not the case, and the problem still lingers after you’ve upgraded to version 1.1, you can dequeue the validation script by placing the following code in your functions.php file:

add_action( 'admin_head', 'my_website_admin_head' );
function my_website_admin_head() {
    wp_dequeue_script( 'custom-post-type-onomies-admin-options-validate' );
When assigning my CPT-onomy terms, I see a checklist but I would like to use the autocomplete box (or a select dropdown).

As of version 1.3, you can change the format for your meta boxes via the settings page! The following filter still works, though, so feel free to use as you please. It will overwrite the settings.

If you have a hierarchical CPT-onomy, the default selection format is a checklist. But if you would rather use the autocomplete box, or a select dropdown, CPT-onomies allows you to hook into the meta box (via a filter) and overwrite the default selection format.

Here’s an example of the filter. More information, check out the «Help» tab in the CPT-onomies settings or visit the FAQ .

add_filter( 'custom_post_type_onomies_meta_box_format', 'my_website_custom_post_type_onomies_meta_box_format', 1, 3 );
function my_website_custom_post_type_onomies_meta_box_format( $format, $taxonomy, $post_type ) {

    * When editing a post with the post type 'movies',
    * we want to assign the 'actors' CPT-onomy terms with an autocomplete box.
   if ( $post_type == 'movies' && $taxonomy == 'actors' ) {
      return 'autocomplete';

   // No matter the post type, we want to assign the 'actors' CPT-onomy terms with a select dropdown
   elseif ( $taxonomy == 'actors' ) {
      return 'dropdown';

   // No matter the post type, we want to assign the 'directors' CPT-onomy terms with a checklist
   elseif ( $taxonomy == 'directors' ) {
      return 'checklist';

   // WordPress filters must always return a value
   return $format;
I added support for «Thumbnail» to my custom post type, but the «Featured Image» box does not show up

You also have to add theme support for post thumbnails to your functions.php file:

<?php add_theme_support( 'post-thumbnails' ); ?>

If FAQ didn’t cover your problem, refer to the following resources:


Stopped working with wp 5.2.2. Cannot loop custom post types by term. Very poor documentation.
This plugin has been the best way to do what it does for several years, and I rely on it for the structure of a couple of sites. It does not deserve a one-star review for it's functionality. The problem is that the current version does not function. When freshly installed, the current plugin version cannot be activated due to a fatal error. But when updating an active copy of the plugin, it white screens the front and back end of the site. To get it back, the plugin folder must be renamed or removed from the server. That's unfortunate, but it happens. Everyone makes mistakes. What matters it how they're handled. The new maintainers of this plugin broke the last update by leaving out a required file. As someone in the support forums pointed out, it can be easily fixed by simply adding this small file back in. But the maintainers themselves have not responded. And have not updated the plugin with this very minor fix. As of the time I write this, it's been nearly a week since the put a site-killing update in the repository, and they've just... left it there. The thing that's kind of a last straw is that the new code that broke everything is for monetization. Which is fine. People gotta get paid. But I'd expect a developer to be especially careful about updating parts of the code that get them paid, since they require literal buy-in from users. Maybe run a few tests? Keep an eye on the support forums? Make sure the thing that asks the greatest degree of trust isn't the thing blowing everything up? No? If this is how they handle the monetization code, it makes me think this the actual functional parts of this plugin don't have much of a future. So while I still like this plugin (when it works), I have to give it 1 star as a warning.
It's a shame I have to write this review. This plugin was, once upon a time, fantastic. When Rachel Cherry had the time to maintain it, it was solid as a rock and worked like a dream. But she went on to find she had dwindling availability, and then the cracks started to show. Eventually she passed it on to its new owners and nothing has really improved. Now every site I have this plugin installed on is broken because the developers FORGOT TO BUNDLE A REQUIRED FILE, and we've been waiting for over 5 days for them to package it. This is entry level stuff. And keeping us waiting for 5 days is just plain lazy. It's now time to say goodbye to this plugin, I will no longer be using it in any future projects, I will not be supporting it in any existing projects, I will not be recommending it to anyone — in fact I will be strongly recommending they avoid it — and I will be looking to replace it in any internal projects we might have used it in. I now have the fun job of going back through every project to see whether they are negatively affected. I only awarded that second star because only a few years ago this plugin was so good.
It wasn't useful in my case because my CPTs are already assigned to their parent CPT, but I understood it is very functional and well supported. I had some layout issues and crashes in my backend, but I guess it's my theme's fault.
Посмотреть все 57 отзывов

Участники и разработчики

«CPT-onomies: Using Custom Post Types as Taxonomies» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:


Журнал изменений


  • added multiple files that were missing in Freemius directory. SVN didn’t pick them up.
  • Fixed ug in cpt-onomy.php reported by Jeff Mulder


  • Minor bug fixes.


  • Fixing memory leak issues. Still have some fixes remaining but wanted to get something out while they’re being worked on.


  • Fixes plugin to work with 4.6.1
  • Removed all the of the constants the plugin defined so be sure to remove any dependencies on them


  • Changed default CPT-onomy labels to match the custom post type labels.
  • Added ‘custom_post_type_onomies_cpt_onomy_labels’ filter which allows users to change the CPT-onomy labels.
  • Fixed issue when using an array as your query orderby.
  • Fixed issue with CPT-onomies not showing all of the correct results.
  • Fixed issue with «other» custom post type settings not displaying their values.
  • Fixed issue with get_adjacent_post() that was causing issue with next_post_link() and previous_post_link().
  • Added ‘admin_column_title’ CPT-onomy setting.
  • Added ‘custom_post_type_onomies_cpt_onomy_admin_column_title’ filter which allows users to change the CPT-onomy admin column title.
  • Added ‘name_admin_bar’ custom post type label setting.
  • Added ‘delete_with_user’ custom post type setting.
  • Added warning messages for when CPT-onomy terms might be conflicting with taxonomy terms.
  • Added action button to delete conflicting taxonomy terms.
  • Changed CPT-onomy capability prefixes to include ‘cpt_onomy_’ to help decrease compatibility issues with regular taxonomies.


  • Fixed bug that was causing issues for multiple tax queries.
  • Optimized queries to help with memory problems.
  • Fixed PHP Parse error in cpt-onomy.php file for those who are running PHP < 5.3.0.


  • Fixed a few WordPress 4.1 bugs.
  • Brought register_cpt_onomy() outside the manager class for ease of use.
  • You can now attach CPT-onomies to media.
  • Added hook to flush rewrite rules whenever settings are changed and an upgrade is run.
  • Added ‘Show In Admin Bar’ setting to custom post type registration.
  • Added ‘Meta Box Title’ property to CPT-onomy settings, to allow you to customize the title of your CPT-onomy meta boxes.
  • Added ‘custom_post_type_onomies_meta_box_title’ filter which allows users to change the meta box title.
  • Fixed a bug with admin drop down filters not tied to ‘show_admin_column’ setting.
  • Removed CPT_ONOMIES_URL constant and replaced with plugins_url().
  • Updated jQuery Validate script to version 1.13.1.
  • Added functionality so when using autocomplete to assign CPT-onomies and term doesn’t exist, clicking «Add the term» auto-populates the post title for the new term.
  • Reinstated the ability to make the CPT-onomy admin columns sortable. Disable the columns from being sortable by returning false to the ‘custom_post_type_onomies_add_cpt_onomy_admin_sortable_column’ filter.
  • Added ability to order posts queries by a CPT-onomy.
  • Changed enqueueing of scripts and styles to use plugins_url() and made sure no versions were used.
  • Fixed bug that was causing memory problems for those with a lot of posts.
  • Added/fixed rewrite rules for pagination and feeds.


  • Documentation has moved to wpdreamer.com.
  • Fixed a bug with WP < 3.5 ‘show_admin_column’ setting not tied to actually showing the column.
  • Fixed Bulk and Quick Edit to work with WP >= 3.5 register_taxonomy() ‘show_admin_column’ columns.
  • Added ‘cpt_onomy_created_object_term_relationship’ action, allowing users to run code when relationships are created.
  • Added ‘cpt_onomy_deleted_object_term_relationship’ action, allowing users to run code when relationships are deleted.
  • Tweaked ‘supports’ setting to prevent default (title and editor) behavior if no ‘supports’ are selected. Must have WP 3.5 or greater.
  • Fixed the «Redefining already defined constructor» issue for PHP5.
  • Edited CPTonomy_Walker_Terms_Checklist::start_el() to match Walker::start_el() and align with strict standards.
  • Removed all instances of default function parameter values in Javascript.
  • Fixed issue with wp_set_object_terms() not working with CRON.


  • Added multisite custom post type manager.
  • Added setting to assign the meta box format, i.e. autocomplete, checklist or dropdown.
  • Added «Show Admin Column» to the CPT-onomy settings.
  • Deprecated the ability to make the CPT-onomy admin columns sortable in order to align with new, default WP taxonomy admin column functionality.
  • Deprecated the ‘custom_post_type_onomies_add_cpt_onomy_admin_sortable_column’ filter.
  • Added support for the «Gravity Forms + Custom Post Types» plugin.
  • Added the ability to only include/assign specific terms by passing term IDs to a filter. See documentation for more information.
  • Added wp_set_post_terms() to the CPT-onomy class.


  • Cleaned up/fixed a bug with $cpt_onomy->wp_set_object_terms().
  • Fixed a bug when assigning terms to CPTs with long names.
  • Fixed a bug when excluding terms from being assigned to new posts via checklist.
  • Fixed bug that sometimes caused fatal error during activation.
  • Added the exclude terms filter to the bulk and quick edit.


  • Minor bug fixes.
  • Custom archive pages can be created pretty easily. See documentation for more information.
  • Non-public custom post types can now be used as CPT-onomies.
  • Added the ability to customize settings by removing options and setting default property values using various filters. See documentation for more information.
  • Added the ability to exclude terms from being assigned by passing term IDs to filter. See documentation for more information.
  • Added the ability to remove assign CPT-onomy terms meta box from edit screen via filter. See documentation for more information.
  • Added the ability to remove CPT-onomy dropdown filter from admin manage custom post type screen via filter. See documentation for more information.
  • Added the ability to remove CPT-onomy column (and/or it’s sortability) from admin manage custom post type screen via filter. See documentation for more information.
  • Fixed a bug with the capability type setting. BE SURE TO RE-SAVE YOUR SETTINGS IF YOU USE THIS PROPERTY.
  • Fixed a bug with the ‘read_private_posts’ CPT capability. BE SURE TO RE-SAVE YOUR SETTINGS IF YOU USE THIS PROPERTY.
  • Changed cpt_onomy.php filename to cpt-onomy.php to match cpt-onomies.php. I’m not sure why I gave it an underscore to begin with.
  • Added the ability to set CPT-onomy term description using ‘term_description’ or ‘{$taxonomy}_description’ filter’.


  • Fixed bug with autocomplete box.
  • Fixed bug when editing «other» custom post types.
  • Fixed bug with custom CPT-onomy archive slug.


  • Added support to programmatically register CPT-onomies.
  • Added support for autocomplete and dropdown CPT-onomy term selection.
  • Added support to customize the CPT-onomy archive page slug.
  • Added support to change term link in tag cloud widget.
  • Added support to exclude term ids from wp_get_object_terms().
  • Added get_term_ancestors() to the CPT-onomy class.
  • Added support for Internationalization.
  • Tweaked the UI.
  • Fixed a few bugs.


  • DO NOT UPDATE IF YOU ARE NOT USING WORDPRESS 3.1 OR NEWER!! If you’re using a version older than 3.1., and having issues, download CPT-onomies 1.0.2. for bug fixes.
  • Added support for Bulk Edit and Quick Edit.
  • Added the ability to sort and filter by CPT-onomy on the admin «Edit Posts» screen.
  • Fixed a bug where tax queries wouldn’t work with CPT-onomies AND taxonomies.
  • Fixed a bug with wp_get_object_terms() not working for multiple object IDs.
  • Fixed a bug with custom ‘Has Archive’ slugs not registering correctly.
  • Added backwards compatability/fixed bug for adding the help tab prior to WordPress version 3.3.


  • Fixed a few bugs with the «Restrict User’s Capability to Assign Term Relationships» feature.
  • The WordPress function, wp_count_terms(), now works with CPT-onomies and doesn’t require the CPT-onomy class.
  • Added get_objects_in_term() to the CPT-onomy class.
  • Added previous_post_link(), next_post_link(), adjacent_post_link(), prev_post_rel_link(), next_post_rel_link(), get_adjacent_post_rel_link() and get_adjacent_post() to the CPT-onomy class with the ability to designate «in the same CPT-onomy».
  • Added support for tax queries when using The Loop.


  • Fixed bug that didn’t delete relationships when CPT-onomy «term» is deleted.


  • Plugin launch!