How to hide “Show … entries” block?
The easiest way to do this is to put this CSS block somewhere in your theme’s CSS file, or in inline CSS:
div.dataTables_length { display: none !important; }
How to hide “Show … entries” block?
The easiest way to do this is to put this CSS block somewhere in your theme’s CSS file, or in inline CSS:
div.dataTables_length { display: none !important; }
How to hide “Showing … of …” block?
The easiest way to do this is to put this CSS block somewhere in your theme’s CSS file, or in inline CSS:
div.dataTables_info { display: none !important; }
How to hide the global search block?
The easiest way to do this is to put this CSS block somewhere in your theme’s CSS file, or in inline CSS:
div.dataTables_filter { display: none !important; }
How to hide one of the Table Tools buttons?
if($this->tableToolsEnabled()){
$obj->dataTableParams->oTableTools = array(
' sSwfPath' => WDT_JS_PATH.'jquery- datatables/media/swf/copy_cvs_xls_pdf.swf',
'aButtons' => array(
array('sExtends' => 'xls', 'sFileName' => '*.xls'),
array('sExtends' => 'print')
)
);
if(!$this->isEditable()){
$obj->dataTableParams->oTableTools['aButtons'][] = 'csv';
$obj->dataTableParams->oTableTools['aButtons'][] = 'pdf';
$obj->dataTableParams->oTableTools['aButtons'][] = 'copy';
}
}
To remove “Copy” button remove this line:
$obj->dataTableParams->oTableTools'aButtons' = 'copy';
To remove “PDF” button remove this line:
$obj->dataTableParams->oTableTools'aButtons' = 'pdf';
To remove “CSV” button remove this line:
$obj->dataTableParams->oTableTools'aButtons' = 'csv';
To remove “Print” button remove this line:
array('sExtends' => 'print')
To remove “Excel” button remove this line:
array('sExtends' => 'xls', 'sFileName' => '*.xls'),
How to disable sorting for one of the columns?
jQuery(function(){
wpDataTables.table_0.fnSettings().aoColumns[3].bSortable = false;
});
This example disables sorting for the fourth column of the first table on
the page.
In this block of code you would need to replace the “0” in the table_0
variable with some other index if you have more then one table on the
page (they are indexed starting from zero). E.g. for the third table this
should be table_2. Also please replace the [3] with the column index,
which is also zero-based (e.g. for column number 5 this should be [4]).
This author will respond to buyers' questions and provides limited support through their own support system.
View the item support policy
We'd like to ask you a few questions to help improve CodeCanyon.