Last active
February 12, 2020 02:00
-
-
Save rafaehlers/e3fa88182cc42b3239ba6b9368a6a997 to your computer and use it in GitHub Desktop.
Disable the built-in search field on DataTables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // Don't copy this line | |
| add_filter( 'gravityview_datatables_js_options', 'disable_gravityview_datatables_search', 11, 3 ); | |
| function disable_gravityview_datatables_search( $dt_config, $view_id, $post ) { | |
| $return_config = $dt_config; | |
| if( $view_id == '81' ) { // change "81" to your View ID | |
| $return_config['searching'] = false; | |
| } | |
| return $return_config; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment