WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. msartori
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/custom-content-type-manager/

  2. fireproofsocks
    Member
    Plugin Author

    Posted 1 year 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

About this Topic

Tags

No tags yet.