CPT-onomies is a WordPress plugin that allows you to create, and use, taxonomies powered by your custom post types, using the post titles as the taxonomy terms.

CPT-onomies work just like any other taxonomy, allowing you to use WordPress taxonomy functions, like get_terms() and wp_get_object_terms(), to access the information you need. Unfortunately, not every taxonomy function works right now but don’t worry, I’ve created CPT-onomy functions to help bridge the gap between WordPress and the plugin. The CPT-onomy functions even mirror the WordPress functions, using the same parameters and return values.

Use the following documentation to see which WordPress taxonomy functions work (and how to use them) and when you’ll need to use a CPT-onomy function. The documentation also includes function parameters, return values, examples, and other helpful information.


  • Paul says:

    In your example, Directors are listed with checkboxes to the left, while Actors just have a search box. I added 2 CPT-onomies to my setup, and both are search boxes. How would I change it so that both will become lists with checkboxes?

  • JuniperPaul says:

    From your work with post types and taxonomies, can you see a way to use the same post type as two different taxonomies?

    Let’s say you’re building a shopping site. As a customer you can select products to add to your Favorites and you can also select products for your shopping cart. One way to engineer this would be to store selections as taxonomic connections between Customer and Products. But both Favorites and Cart make connections to the same Products post type. Your plugin doesn’t appear to allow this, since Products would be listed just once as a post type one can use as a taxonomy for the Customer post type. Can you see any way to wrangle it? Does your plugin create a taxonomic alias for a post type, and if so could one create two aliases for the same post type?

    • rachelcarden says:

      Hmm. That’s an interesting thought. Right now my plugin does not do this but I might add that to my list and do some research. Your best solution at the moment might be to use CPT-onomies to create one of the relationships and use another relationship method for the other.

  • Chris says:

    Hi I might be missing something here but I have made a new custom post type and added a post but it just goes to a 404 error page? Do I have to enable something to use my current category and post template style

    • rachelcarden says:

      You will probably need to flush your rewrite rules. Go to Settings->Permalinks and click “Save Changes”.

      • Chris says:

        Hey Rachel, love the rapid response! Yes I have been changing a few settings. Initially had flushed the rewrite rules. Is there a way we can talk over email or private? I want to send a few URLs but dont want them to be public

  • SN0WKRASH says:

    Hi, I only needed to create a custom post type for now. I did that, and the post is showing up, but it does not display like my other posts. Do I need to create a new template file that’s a copy of another, existing file, then rename it or something?

  • Bel says:

    I installed the plugin, created a custom post-type named “person” and attached it to posts.

    Then, I added the plugin widget and set the link to go to “Term Archive Page”.

    When I click on one of the links in the widget, let’s say “person1”, it goes to a page named “www.example.com/person/tax/person1” which is a broken page with the error
    “Not Found The requested URL /person/tax/person1 was not found on this server.”

    I tried entering this url manually:
    hoping it will list all posts categories as “person1”, but it actually gets the post of “person1”.

    I tried Settings->Permlink->Save but nothing changed.

    Any suggestions what could be the problem ?

    • rachelcarden says:

      Unfortunately, these archive pages are a pain in the butt because the cause could be a number of things. How do your settings look? Is the “Has Archive Page” for the CPT-onomy set to true?

      • Bel says:

        yes, it is set to true.

      • Bel says:

        I know programming very well, I just need little ques to know where to look for the problem.

        Is it a problem with your plugin or a problem in the configurations or wordpress ?

        Why the URL has this “/tax/” ? is it from your plugin or is it wordpress standard ? probably, it is your thing.

        If I want to check in your code, where is a good candidate to look for the problem ?

        • rachelcarden says:

          Well the manual parameter URL probably didnt work because
          ‘cpt_onomy_archive=1’ is required for CPT-onomy archive pages so it
          would be ‘http://www.example.com/?post_type=post&person=person1&

          The “/tax/” is my thing, but its something you can change in the settings under “Archive Page Slug”.

          I would check your rewrites. This could help you out: http://wordpress.org/plugins/rewrite-rules-inspector/

          • Bel says:

            the manual parameter URL does not work with or without cpt_onomy_archive=1

            in both cases, it shows the post of “person1”, not the list of posts categories as “person1”.

            Is this the expected behavior ? I am assuming not.

      • Bel says:

        Solved. The problem was in the rewriting rules. mod_rewrite was not installed, .htaccess did not exist and permalink was not enabled.

        Because of all of that, your plugin’s rewriting rules were not generated. Apparently, you rely on the rewriting rule to fix the manual URL. I mean, if I type the URL myself without relying on the rewriting rules, it does not work, because your plugin gets the post_type from the activated rewriting rule. To be more precise, I am talking about the file: manager.php function: revert_query_vars.

        I have a suggestion for a better way to fix the post_type. You can get the correct post_type (not the one that wordpress generated) from _GET. All what you need it a slight change in the function: “change_query_vars”. Near the end of this function, there are two copies of this line “unset( $query[ ‘name’ ] );”. Just add the following lines in the block of the first copy:

        if( isset( $_GET[‘post_type’] ) )

        $query[ ‘post_type’ ] = $_GET[‘post_type’];


        $query[ ‘post_type’ ] = ‘post’;

        I tried it and it worked, although, I removed it because I do not know all the details of your plugin or wordpress, so may be I am messing something else.

        If you think this change does not mess with anything else, let me know, because I wanna go back and disable permalink and the rewriting rules.

        I hope you find this comment useful.


  • @cf04cca68135ce6bce0e0c1224250baf:disqus This is a core plugin that I use in my environment for creating relationships. Thank you for creating such an awesome plugin.

  • Mike Lewis says:

    In case anyone hasn’t pointed this out: I wasn’t sure what the /tax/ was for in the archive page slug, and so I removed it, and used: $post_type/$term_slug.

    Then, when I create a new custom post, I get a 404 error. This is because the /post-type/post-name/ is intercepted with your cpt_onomy_archive=1 query var.

    It might be worth explaining that this isn’t possible. Also, I love your documentation (your tabbed, color coded layout is awesome), and I found more than enough detail on specific functions. I couldn’t seem to find more of a conceptual understanding, and general example. I understand what the plugin is doing, but its more the rewrites, urls, slugs, archive pages, and those details that were a little confusing.

    Part of my confusion is in your name: “CPT-onomy” combines the idea of a custom post type, and taxonomy, which is great. However, when you refer to a CPT-onomy, are you referring to the Taxonomy, or the Custom Post Type? Your plugin creates both simultaneously, which is also great… However, I might suggest that you separate the two ideas.

    I think someone else suggested the ability to add two CPT-onomies to a CPT. Here’s a potential workflow:

    Keep the CPT creation separate from the CPT-onomy. Then, all CPTs (new and existing) appear in the list of CPT’s (the box you call “Other Custom Post Types”), and you can now add one, or more, CPT-onomies to that post type. Now you have separation of CPT and CPT-onomy.

    Showing the permalink structure under each item (CPT and CPT-onomy) could help users visualize and understand what’s going on:

    /product/shoe/ vs /product/tax/shoe/


  • ViduaRarikola says:

    Great plugin ! Thanks a lot !
    This could be a very dumb question but gotta ask anyway. How do I remove “tax” from generated URL’s? is it possible?

    • rachelcarden says:

      Check out your “Register this Custom Post Type as a CPT-onomy” settings. There’s a field named “Archive Page Slug” that should help you out. :)

  • ViduaRarikola says:

    Now I really need your help. Everything works great except the pagination . When I go to next page of custom post type term, page is not found. Please help. Thanks so much in advance.

  • Xara Sims says:

    I use the_terms( $post->ID, ‘sites’, ‘ ‘, ‘, ‘, ” ); (where sites is my taxonomy) to get the taxonomy name pointed to single post and this is great but I’m looking for day to find the code to point the taxonomy name to archive page… Please help a non tech girl….

  • Cris says:

    Hi Rachel,

    What’s the template file if a term page is being displayed? Will it look for single-posttype.php or taxonomy-taxname.php

    And is it also possible to display the values from the description and custom fields from the post type into the term page? Based on the functions listed above, I think it’s not possible.


    • Cris says:

      Ok, I tested it exactly works like a taxonomy term and it only returns values same as any other taxonomy.

      Is their any way I can use the values from the content and the custom fields of the post type?

      If not, is their anyway I can add custom fields?

      • Cris says:

        LOL, sorry for spamming I’m answering my own questions, so I was able to get the values from the post type by doing a wp_query on the term page itself, i used the term slug to query the post type and get the values.

        I’m not just sure if this is the proper way to do it or there’s much better way to achieve what I want. Am I on the right path?

        – Cris

Leave a Reply