This Gist shows how to add a sortable Views column to the post/page/custom-post-type edit screen.
Out of the box, the script will display the Views column on both the Posts and Pages screens. You can change that by editing the $post_types_with_views_column
array at the beginning of the script.
- Using the text editor of your preference, create a file called
wpp-sortable-columns.php
and add the contents of this script to it. - Place the
wpp-sortable-columns.php
file inwp-content\plugins
.