Skip to main content

All Questions

Tagged with
17 votes
3 answers
26k views

Make custom column sortable

I have a added custom column to a custom post type, and it works fine. I just want it to sort the names by title, so I tried this, function sortable_custom_columns( $columns ) { $columns['...
thatryan's user avatar
  • 433
16 votes
1 answer
19k views

How do I set the default admin sort order for a custom post type to a custom column?

SOLUTION AVAILABLE HERE I've set up a custom post type called clientarea, and set up several custom columns for it in the admin area - the custom columns are all custom meta fields, as you can see ...
SinisterBeard's user avatar
7 votes
1 answer
9k views

Custom sortable columns ordered by meta-value?

I have no idea why my sortable function does not sort my "events" my a custom post-meta. I have a custom-post-type named wr_event… I have my custom columns set up and my post-meta is shown in the ...
mathiregister's user avatar
6 votes
3 answers
5k views

sortable custom column in media library

trying to make a custom column sortable in the media library. Found lots of examples for posts, and users but can't get them to work on the media library page. function wpse_hook_isv_columns() { ...
v3nt's user avatar
  • 1,689
5 votes
1 answer
3k views

Sortable admin columns, when data isn't coming from post_meta

I have a custom post type that uses a custom taxonomy. I'm imposing a limit of a single term to each post (using a custom meta box drop down on the edit post screen for the CPT). The term for the ...
Dave Romsey's user avatar
  • 17.8k
5 votes
1 answer
3k views

initial sort order for a sortable custom column in admin

I have created a number of 'views' column in the admin area of my posts. There are several tutorials for this and I did in fact use a number of these to arrive at my end result. It works as expected ...
Madivad's user avatar
  • 264
4 votes
1 answer
744 views

Column sorting with emtpy meta values

I am trying to sort my custom post type columns in the admin area. There's two ways I found to do this: At first this was my way to do it, however I got some strange behaviours. If a meta value is ...
Kay van Bree's user avatar
2 votes
1 answer
639 views

How do I sort a custom post type admin column using two meta keys?

I have created a custom post type along with custom columns. One of my columns displays a date range such as "12/05/2012 - 11:00 am to 12/15/2012 - 1:00 pm". This is a concatenated string using a ...
strykern9ne's user avatar
2 votes
0 answers
597 views

Custom column sorting in WordPress admin post table

I have made a custom column in user administration panel showing user meta data and registered it as sortable. Made a query action to sort it by the meta numerical value (the stored user meta data is ...
fIshy's user avatar
  • 21
1 vote
1 answer
1k views

Vertical alphabetically post columns

I need to create a 9 column list that outputs posts sorted vertical and alphabetically. I'm getting closer, but still not there. I have two separate loops I'm working with. The first loop I have the ...
user2059370's user avatar
1 vote
1 answer
735 views

Admin multiple column sorting

This question seems simple enough, and I'm surprised that I don't find much while searching Google to find an answer. The only thing I've found is a pro plugin, so far. I'd just like to be able to ...
Mark's user avatar
  • 321
1 vote
1 answer
3k views

Advanced Custom Fields: Sorting custom columns with custom fields sorts only by date

I have a custom post type – “members”. With help of Advanced Custom Fields(AFC) I’ve created a Field Group with 5 fields and assigned that group to my “members” post type. I followed this article to ...
Acidon's user avatar
  • 147
1 vote
1 answer
1k views

Admin table list API?

wp-admin table lists - like post list Is there a API or something to build table lists in wp-admin? With table lists I mean like the list of posts for example. It has columns, sorting, paging and so ...
Jens Törnell's user avatar
1 vote
1 answer
704 views

Order a custom post type admin screen by a second custom post type title

I have two custom post types: Products and Brands. The Product slug is 'eproduct'. The Brand slug is 'brand-listing'. On the Product admin page, I have added a custom column that lists the Brand ...
LeonardShelby's user avatar
1 vote
2 answers
519 views

Sort by site/blog column in Multisite

I use WordPress Multisite and made a plugin that adds columns with some data. My code is based on this WP Engineer article. The key function in WordPress Multisite is manage_sites_custom_column. And ...
Jens Törnell's user avatar

15 30 50 per page