Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lester Chan

    (@gamerz)

    You can take a look there
    https://github.com/lesterchan/wp-postratings/blob/master/includes/postratings-admin.php#L43-L44

    You can add
    add_filter( 'manage_edit-<CPT>_sortable_columns', array( $this, 'postrating_admin_column_sort' ) );

    Thread Starter slntprtnrs

    (@slntprtnrs)

    Amazing, thank you @gamerz! Big ups!! 😀

    Thread Starter slntprtnrs

    (@slntprtnrs)

    … if anyone’s looking at this for a similar solution to WP-Postviews (another great plugin by @gamerz!), you can insert something similar at line 830 in wp-postviews.php:

    add_filter( 'manage_edit-CPT_sortable_columns', 'sort_postviews_column' );

    Thanks again, Lester!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘column sort for custom post type’ is closed to new replies.