Fatal error after 4.4 upgrade class-wp-list-table

Nice solution you have there. But you must define a $screen property inside WP_List_Table class (or its child class) before pagination method is invoked. You want to make the $screen property as WP_Screen instance using this function : $this->screen = get_current_screen(); There you go, and your table is ready to go. Thanks

WP List Table custom quick edit box – post meta data missing and columns change on submit

I just run in the same error when adding extra columns to the default post types. The offending line was the $pagenow check. Quick Edit uses admin-ajax.php so it doesn’t renders the custom columns when it’s done. This doesn’t work: if( ‘edit.php’ == $pagenow && is_admin() ) { add_action( ‘admin_init’, array( $this, ‘init_id_column’ ), 999 … Read more

Why does my custom taxonomy show a total count across all post types

There is currently a trac ticket on the fact that taxonomy counts are global (include all post types). Related trac ticket. To fix this you can remove the column and add your own using the manage_edit-{$taxonomy}_columns filter: add_filter(‘manage_edit-season_columns’,’my_season_columns’); function my_season_columns($columns){ unset($columns[‘posts’]); $columns[‘cpt_count’] = ‘Races’; return $columns; } You then tell WordPress what to fill this … Read more

wp_list_tables bulk actions

If you add a bulk-action, then you have to react on this action. Simply adding a function doesn’t do anything, you have to call it: class WPSE_List_Table extends WP_List_Table { public function __construct() { parent::__construct( array( ‘singular’ => ‘singular_form’, ‘plural’ => ‘plural_form’, ‘ajax’ => false ) ); } public function prepare_items() { $columns = $this->get_columns(); … Read more

Custom Table Column Sortable by Taxonomy Query

To achieve adding a custom sortable column to the WP_List_Table of your post type within the WordPress administration back-end dashboard, you will need to do the following: Replace all occurrences of YOUR-POST-TYPE-NAME with your actual post type name. Replace all occurrences of YOUR-TAXONOMY-NAME with your actual taxonomy name. Replace all occurrences of YOUR COLUMN NAME … Read more

How do I add a WP_List_Table to WordPress page?

Your WP_List_Table will be different — this was adapted from WP_List_Table – a step by step guide and using the GIST: Sample plugin for usage of WP_List_Table class (complete version). You’ll want to adjust your methods to include CSS on the front-end as well (not included in this answer). WARNING : Since this class is … Read more