Black friday Black friday Black friday Cyber monday Cyber monday Cyber monday
Up to 70% off Up to 70% off
Grab Yours

When customizing wpDataTables for your own usage, you might find that the default position of those elements is not quite to your liking. You have to modify some code in the core of the plugin.

Example to move info block above the table is to edit the plugin file. In file ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php around line 3515 find:

$obj->dataTableParams->sDom = "BT<'clear'>{$showRowsPerPage}{$globalSearch}{$scrollable}{$infoBlock}{$pagination}";

and replace it with:

$obj->dataTableParams->sDom = "B{$infoBlock}T<'clear'>{$showRowsPerPage}{$globalSearch}{$scrollable}{$pagination}";

If you want info block at the top and bottom of the grid, replace it with:

$obj->dataTableParams->sDom = "B{$infoBlock}T<'clear'>{$showRowsPerPage}{$globalSearch}{$scrollable}{$infoBlock}{$pagination}";

each letter stands for the different block. Our plugin is based on Datatables jQuery plugin and more details about DOM positioning can be found on this link.

Note: If you make these changes, they will be overwritten with the next update, so you will need to make the changes again.

Was this answer helpful ? Yes No

Comments are closed.

Wait, Before You Download!

To get your hands on wpDataTables Lite, please enter your email address below. We’ll send you a direct download link and keep you updated on existing features along with helpful tips and tricks!

By continuing, I accept Privacy Policy and T&C
Mail Box