Custom List Table Example
[resolved] Sort Order on Original Sorted Column always Descending (2 posts)

  1. AJ Mallory
    Posted 3 years ago #

    Great example of how to implement wp_List_Table class. Really helpful thank you for putting this together. I found an issue/bug: After changing the sort order to a different column than the original column if you wish to sort the original column it always sorts in descending order.

    To recreate this issue 1. run the given example code and open the 'List Table Example' tab. 2. Click the Rating column to change the sort order to Rating, now change try to change the sort order on the Title to be ascending. You will find that you must fist sort Title to Descending before you can sort that column in ascending order.

    Fix: To correct this simply change line 256 to read `'title' => array('title',false), (change true to false) then sorting behaves as one would expect.


  2. Matt van Andel
    Plugin Author

    Posted 3 years ago #

    Thanks Jason!

    I'll update the plugin ASAP.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom List Table Example
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic