Custom Content Type Manager
[resolved] Sortable custom columns in admin? (2 posts)

  1. msartori
    Posted 2 years ago #

    In the columns tab I've selected "Customize Columns" and I added one of my custom fields. The field prints out correctly in the results table, but this column header is the only one that isn't sortable.

    Is there a way to make these custom column headers sortable?


  2. fireproofsocks
    Plugin Author

    Posted 2 years ago #

    This was a bug -- best to post that in the bug-tracker, otherwise I may never see it.

    I've committed the fix to the repo and it will available in the next version of the CCTM (although I'm having trouble with WP recognizing that a new version has been released -- ?!?).

    If you want to make the fix now, edit the includes/CCTM.php file and look for the public static function order_posts() function (somewhere around line 1700). Change the following line:

    $orderBy = "{$wpdb->postmeta}.meta_key $order";

    To this:

    $orderBy = "{$wpdb->postmeta}.meta_value $order";

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Content Type Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.