Title: [Plugin: WP-dTree] Custom Post Type   Taxonomy
Last modified: August 19, 2016

---

# [Plugin: WP-dTree] Custom Post Type Taxonomy

 *  [jharder](https://wordpress.org/support/users/jharder/)
 * (@jharder)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/)
 * Just installed WP-dTree and it works fine with my site’s default categories. 
   My goal is to use it to display a custom taxonomy categories, populated with 
   posts of a custom post type. This does not work.
 * There does not seem to be any way to select post type/taxonomy in the widget 
   settings.
 * Also tried adding the template tag like so…
    wpdt_list_categories(‘post_type=
   myposttype&taxonomy=mytaxonomy’); This will display the custom taxonomy category
   names, but does not build the links properly, does not display the post count,
   and does not display post names/links.
 * Am I missing something? Does this plugin not support custom post-types/taxonomy?
 * Thanks for any advice.

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Thread Starter [jharder](https://wordpress.org/support/users/jharder/)
 * (@jharder)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841296)
 * Correction: Post count is working, but I cannot display post names (even with
   listposts=1 in my args) and the category names are not linking properly
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841484)
 * WP-dTree does not support custom post-types/taxonomy. I don’t even know what 
   they are.
 * You can try and convince that it’s a worthile feature though. I recommend you
   start by linking me to some proper documentation explaining what they are, how
   they are used and what for.
 * And also [books](http://www.amazon.com/gp/registry/wishlist/2QB6SQ5XX2U0N/105-3209188-5640446?reveal=unpurchased&filter=all&sort=priority&layout=standard&x=21&y=17).
   Books are very persuasive. 🙂
 *  Thread Starter [jharder](https://wordpress.org/support/users/jharder/)
 * (@jharder)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841546)
 * Codex page on custom taxonomy (aka custom categories) [http://codex.wordpress.org/Taxonomies#Custom_Taxonomies](http://codex.wordpress.org/Taxonomies#Custom_Taxonomies)
 * Codex page on post types (pretty much the main attraction for WP 3.0 imo)
    [http://codex.wordpress.org/Post_Types](http://codex.wordpress.org/Post_Types)
 * wp_list_categories has a taxonomy arg (ie taxonomy=my_taxonomy) which will return
   only categories from that specified category group. Works like a charm. Using
   the wpdt_list_categories with the same arg returns the correctly filtered category
   names, but the links are all written as href=mysite.com/category instead of href
   =mysite.com/custom-category-name
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841566)
 * Interesting stuff for sure. I’ll probably take a crack at it soonish.
 * As for the link-errors, try opening wp-dtree-cat.php and change the MySQL-query
   at line 47:
    `AND {$wpdb->term_taxonomy}.taxonomy = 'category'`
 * To:
    `AND {$wpdb->term_taxonomy}.taxonomy = $taxanomy`
 * And of course, make sure you’ve set the correct rewrite-argument when calling
   register_taxonomy.
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841567)
 * Oh, and probably change all `get_category_link($cat->term_id)` to `get_term_link(
   $cat->term_id, $taxanomy)` too.
 *  Thread Starter [jharder](https://wordpress.org/support/users/jharder/)
 * (@jharder)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841581)
 * Cool. Thanks ulfben. With your suggestion I should be able to work out the solution.
   I will post it here if I do.
 *  [johnnymestizo](https://wordpress.org/support/users/johnnymestizo/)
 * (@johnnymestizo)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841593)
 * +1
 *  Thread Starter [jharder](https://wordpress.org/support/users/jharder/)
 * (@jharder)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841597)
 * I tried the suggestions above, but no luck. The category URLs are still not correct.
   Maybe the problem is in how I am registering my taxonomy? Here’s the code I’m
   using:
 *     ```
       function create_transitshare_taxonomies() {
       	register_taxonomy( 'transitshare-category', 'transitshare', array( 'hierarchical' => true, 'label' => 'transitSHARE Categories', 'rewrite' => array("slug" => "transitshare-category") ) );
       }
       ```
   
 * That said – I think the bigger issue is getting posts from a custom post type.
   I tried changing the post_type from ‘post’ to ‘name of my custom post type’ in
   line 103 of wp-dtree-cat.php but no luck there either.
 *  Plugin Author [ulfben](https://wordpress.org/support/users/ulfben/)
 * (@ulfben)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841598)
 * Yeah, I suspect this will require a fair bit of re-wiring. WordPress internal
   functionality is always very close but not quite what I need (for categories 
   especially) so there’s a bunch of custom queries in there that’ll need major 
   revisions.
 *  Thread Starter [jharder](https://wordpress.org/support/users/jharder/)
 * (@jharder)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841599)
 * No kidding! I can either get categories with posts (but no category hierarchy)
   or hierarchical categories (but no categories).

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘[Plugin: WP-dTree] Custom Post Type Taxonomy’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-dtree-30_fcfcf8.svg)
 * [WP-dTree](https://wordpress.org/plugins/wp-dtree-30/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-dtree-30/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-dtree-30/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-dtree-30/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-dtree-30/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-dtree-30/reviews/)

## Tags

 * [WP-dTree 3.0](https://wordpress.org/support/topic-tag/wp-dtree-3-0/)

 * 10 replies
 * 3 participants
 * Last reply from: [jharder](https://wordpress.org/support/users/jharder/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-dtree-custom-post-type-taxonomy/#post-1841599)
 * Status: not resolved