Thursday, July 7, 2022
HomeWordPress Developmentcustomized publish sorts - CPT Columns would not present classes

customized publish sorts – CPT Columns would not present classes


I’ve the next code creating some Columns and reordering them to my CPT.

// SHOW THE FEATURED IMAGE
operate pessoas_custom_columns_data($column_name, $post_ID) {
    if ($column_name == 'featured_image') {
        $post_featured_image = cpt_pessoas_featured_image($post_ID);
        if ($post_featured_image) {
            echo '<img class="bg_fi_postlist" src="' . $post_featured_image . '" />';

        }
    }
}

operate reorder_pessoas_columns( $columnspessoas ) {
    $columnspessoas = array(
        'cb'                    => $columnspessoas['cb'],
        'featured_image'        => __( 'Pessoas' ),
        'title'                 => __( 'Nome' ),  // Publish Title
        'categorias_de_pessoas' => __( 'Categorias' ),  // Classes for my CPT
        'post_type'             => __( 'Tipo' ),
        'creator'                => __( 'Autor' ),
        'date'                  => __( 'Date' ) // Printed Date
    );
    return $columnspessoas;
}

add_action( 'manage_pessoas_posts_custom_column' , 'pessoas_custom_columns_data', 10, 2 );
add_filter( 'manage_pessoas_posts_columns', 'reorder_pessoas_columns' );

My query is:
why 'categorias_de_pessoas' => __( 'Categorias' ), would not the present the content material inside the classes chosen to my publish? This can be a taxonomy referred to as ‘categorias_de_pessoas’.

Thanks as soon as once more.
AMP.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments