division84
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Fixing WordPress
In reply to: Custom Post Type Taxonomy Displayfunction add_new_gallery_columns($gallery_columns) { $new_columns['cb'] = '<input type="checkbox" />'; $new_columns['title'] = __('Title');; $new_columns['author'] = __('Author'); $new_columns['specs_'.$_GET['post_type']] = __('Categories'); //$new_columns['tags'] = __('Tags'); $new_columns['date'] = _x('Date', 'column name'); return $new_columns; } add_action( 'manage_posts_custom_column' , 'custom_columns' ); function custom_columns( $column ) { global $post; switch ( $column ) { case 'specs_health': $terms = get_the_term_list( $post->ID , 'specs_health' , '' , ',' , '' ); if ( is_string( $terms ) ) { echo $terms; } else { echo 'Please Put In A Category'; } break; case 'specs_lifestyle': $terms = get_the_term_list( $post->ID , 'specs_lifestyle' , '' , ',' , '' ); if ( is_string( $terms ) ) { echo $terms; } else { echo 'Please Put In A Category'; } break; case 'specs_relationships': $terms = get_the_term_list( $post->ID , 'specs_relationships' , '' , ',' , '' ); if ( is_string( $terms ) ) { echo $terms; } else { echo 'Please Put In A Category'; } break; case 'specs_entertainment': $terms = get_the_term_list( $post->ID , 'specs_entertainment' , '' , ',' , '' ); if ( is_string( $terms ) ) { echo $terms; } else { echo 'Please Put In A Category'; } break; } }This worked for me like a charm. The “specs_whatever” are the names of my custom taxonomies.
Viewing 1 replies (of 1 total)