WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type UI
[resolved] List CPT's with taxonomy columns included in UI? (1 post)

  1. mrjysta
    Member
    Posted 3 years ago #

    Hi great plug-in, only thing stopping me using it over manually creating my CPT's and Taxo's is that the CPT's columns don't display the Taxonomies applied when in list view. This is pretty major especially when handing over to clients.

    See below for code need to be added in function.php when adding the columns manually, hopefully this could be built into the next update??? :

    'add_action("manage_pages_custom_column", "mycpt_custom_columns");
    add_filter("manage_edit-services_columns", "mycpt_edit_columns");

    function mycpt_edit_columns($columns){
    $columns = array(
    "cb" => "<input type=\"checkbox\" />",
    "title" => "Cpt Title",
    "taxonomy" => "Taxonomy Title",
    "description" => "Description",
    );

    return $columns;
    }
    function mycpt_custom_columns($column){
    global $post;

    switch ($column) {
    case "taxonomy":
    echo get_the_term_list($post->ID, 'my_taxonomy', '', ', ','');
    break;
    case "description":
    the_excerpt();
    break;
    }
    }
    '

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic