johnbillion / extended-cpts

A library which provides extended functionality to WordPress custom post types and taxonomies.
GNU General Public License v2.0
979 stars 96 forks source link

Option to control admin columns order? #54

Closed lmartins closed 7 years ago

lmartins commented 8 years ago

Hi,

Im extending an existing post type to add a few admin columns. By default it seems that the columns added by extended-cpts are placed first in the post list: screenshot 2016-08-12 11 34 14

The brand column was created with the library. Do we have an option to control how the added columns are displayed on the list?

johnbillion commented 7 years ago

It's a bit of a difficult thing to deal with, but yes you can achieve this by specifying the IDs of the other columns in your admin_cols array. For example:

'admin_cols' => array(
  'title',
  'sku',
  'brand' => array(
    'taxonomy' => 'brand'
  ),
  'stock',
  'price',
  ...
)