Skip to content

Instantly share code, notes, and snippets.

@zackkatz
Last active September 29, 2022 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zackkatz/fa7fadfe869590d85d314bcf5353554c to your computer and use it in GitHub Desktop.
Save zackkatz/fa7fadfe869590d85d314bcf5353554c to your computer and use it in GitHub Desktop.
GravityView DataTables - Remove the page length, pagination menus, and search field
<?php // DO NOT COPY THIS LINE!!!!!
add_filter( 'gravityview_datatables_js_options', 'gv_dt_disable_paging_search_and_length_menus', 10, 3 );
/**
* Remove the page length, pagination menus, and search field from DataTables
* @param array $dt_config DataTables options
* @param int $view_id View ID
* @param WP_Post $post Current WordPress post object
*
* @return mixed
*/
function gv_dt_disable_paging_search_and_length_menus( $dt_config ) {
$dt_config['lengthChange'] = false;
$dt_config['paging'] = false;
$dt_config['searching'] = false;
return $dt_config;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment