showing custom taxonomies w/custom post type

For the dashboard post listing bit….

http://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column

    // ADDS EXTRA INFO TO ADMIN MENU FOR PRODUCT POST TYPE
add_filter("manage_edit-ve_products_columns", "voodoo_prod_edit_columns");
add_action("manage_posts_custom_column", "voodoo_prod_custom_columns");

function voodoo_prod_edit_columns( $columns ) {

    // Add the extra column for product categories instead of rebuilding the whole array
    $columns['prod_cat'] = "Product Category";
    $columns['description'] = "Excerpt";

    return $columns;
}

function voodoo_prod_custom_columns( $column ) {
    global $post;
    switch( $column ) {
        case "description":
            the_excerpt();
        break;
        case "prod_cat":
            echo get_the_term_list( $post->ID, 'product_category', '', ', ', '' );
        break;
    }
}

I use this to add in 2 columns to my ve_products custom post type. the description column displays the excerpt, the prod_cat displays my custom taxonomy (product_category). Getting rid of:

$columns['description'] = "Excerpt";

Would kill the excerpt portion and only bring in the taxonomy. You just have to swap in your own tax name. And also in the first filter, your own CPT (per the link I gave)


As for your other question, are you just looking to spit out the taxonomy? I’m not sure, so I will just try to answer what I think you are asking.

            <?php   
            // Let's find out if we have taxonomy information to display   
            // Something to build our output in   
            $taxo_text="";   

            // Variables to store each of our possible taxonomy lists   
            // This one checks for a Product Category classification   
            $prodcat_list = get_the_term_list( $post->ID, 'product_category', '', ', ', '' );

            // Add Product Category list if this post was so tagged   
            if ( '' != $prodcat_list )   
            $taxo_text .= $prodcat_list;
            ?>

I use this to store my taxonomy (product_category). I put this up at the top of my loop, above where I need to display the actual tax. Then I can spit it out using:

<?php echo $taxo_text; ?>

So the big block of code loads up the terms for product_category, and then echoing out taxo text spits out the terms, it behaves like the_category would. You would just need to swap in your tax name where I have product_category