The Primary Column

Every WordPress list table has a ‘Primary Column’, which is a special column containing a value and additional links such as ‘Edit,’ ‘View,’ and ‘Trash.’ With Admin Columns, you have control over choosing this special column and its placement. Let’s take a closer look.

What is the purpose of the Primary Column?

This column makes sure you can always edit, trash, and view your content. Depending on the context, other actions can also be available: marking a comment as spam, or custom behavior added by a plugin such as “Duplicate”.

At first sight, it might also seem that the Primary Column’s value is a link to the edit page. But this link is just something WordPress added to the ‘default first’ column on a list table. This shows these are two separate things:

Example of the Primary Column set to a column other than ‘Title’

With Admin Columns you can assign any column to become the Primary Column, but you can never remove it. If the default column is not available, WordPress will just assign the Primary Column to the first column on the screen. And that is a good thing, as without this column it would be hard to perform most actions on your content. This is especially useful to know when you, for example, replace the default Title column with the one Admin Columns ships (e.g. to enable Conditional Formatting for that column).

Another good thing to know about this special column is that it’s the only column shown when you use WordPress on a mobile screen:

How to set the Primary Column on a list table

It can easily be set on the columns settings page. You can choose any column that is available on the list table. If you choose nothing, it means the first or the default WordPress column will become the Primary Column.

Location of the Primary Column setting on the settings page

The “Action” column

Admin Column also has an ‘Action’ column which automatically acts as the Primary column for a list table. This column transforms the most common WordPress action links into icons, which are always visible. This can result in a more compact and cleaner interface.

As this column is specifically designed to function as the Primary Column, you can no longer use the setting when you use this column.

Action column in action on the WordPress List Table
Example of the Action column

How to choose which column to use

For most setups, the WordPress default works just fine. But if you remove or replace that column, the Primary Column should feature information that is most important for the table’s purpose. For a blog post, this might be the post title or publication date. For an orders list table, it could be the product name or SKU. And if you use WordPress on your mobile, remember this is the only column you see.