Admin Column Customizations

1ος τρόπος: Αλλάζει μόνο τη στήλη Title

//Modify Title Column for CPT websites
function my_custom_function($columns){

 $columns['title'] = 'Website Title';

 return $columns;
}
add_filter('manage_websites_posts_columns', 'my_custom_function');

2ος τρόπος: Αφαιρεί όλες τις default στήλες και προσθέτει όσες ορίζονται στη συνάρτηση

function my_custom_function( $columns ) {
  
    $columns = array(
      'cb' => $columns['cb'],
      'image' => __( 'Image' ),
      'title' => __( 'Title' ),
      'price' => __( 'Price', 'smashing' ),
      'area' => __( 'Area', 'smashing' ),
    );
  
  return $columns;
}
add_filter( 'manage_websites_posts_columns', 'my_custom_function' );

This is equivalent to the following example, in which indexes are assigned manually:

function my_custom_function( $columns ) {
  
	$columns['image'] = 'Image';
	$columns['title'] = 'Title';
	$columns['price'] = 'Price';
        $columns['area'] = 'Area';
        
  return $columns;
}
add_filter( 'manage_websites_posts_columns', 'my_custom_function' );
«
»
ACF (3)
Admin Column (4)
Amps (9)
Breadcrumbs (2)
CSS (6)
Custom post types (4)
Custom Taxonomies (3)
Customizer (4)
Furniture (3)
Hooks & Filters (3)
Jquery (9)
LAMP (10)
Login (5)
Meta boxes (6)
Multisite (2)
My Code (1)
Open Graph Meta Tags (1)
Pedals (9)
Redirects (2)
SEO (4)
Theme Building (5)
Title Tags (2)
Tuners (3)
Turntables (2)
Typography (3)
Uncategorised (57)
User Roles & Capabilities (2)
White labeling (9)
Working with Images (11)
Working with videos (2)
WP Database (1)