wpbp / cpt_columns
Improve the CPT list in the backend for your CPTs
Installs: 6 557
Dependents: 0
Suggesters: 0
Security: 0
Stars: 20
Watchers: 4
Forks: 6
Open Issues: 0
This package is auto-updated.
Last update: 2025-01-21 15:37:03 UTC
README
Improve the CPT list in the backend for your CPTs
Install
composer require wpbp/cpt_columns:dev-master
composer-php52 supported.
Example
$post_columns = new CPT_columns( 'demo' ); $post_columns->add_column( 'cmb2_field', array( 'label' => __( 'CMB2 Field' ), 'type' => 'post_meta', //text, thumbnail, post_meta, author, custom_tax, custom_value 'meta_key' => '_demo_meta_text', 'orderby' => 'meta_value', // For WP-Query 'sortable' => true, 'prefix' => '<b>', 'suffix' => '</b>', 'def' => 'Not defined', // Default value in case post meta not found 'order' => '-1' // This is the last column ) );