By default, the WP_List_Table
has column names at the top and the bottom of the table.
How can I remove the bottom table headers? Thanks.
p.s. I have already subclassed the WP_List_Table
.
By default, the WP_List_Table
has column names at the top and the bottom of the table.
How can I remove the bottom table headers? Thanks.
p.s. I have already subclassed the WP_List_Table
.
You can override the WP_List_Table::display()
method and remove the tfoot
which contains the bottom table headers:
<tfoot>
<tr>
<?php $this->print_column_headers( false ); ?>
</tr>
</tfoot>
Or you can add a specific class
to the relevant admin page and use CSS to visually hide the bottom table headers:
.my-plugin-foo-page table.wp-list-table > tfoot {
display: none;
}