Created
May 9, 2024 18:51
-
-
Save rafaehlers/c76ddf39be2004b66b66745d2acb4c12 to your computer and use it in GitHub Desktop.
Deactivate DataTables widgets
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 //DO NOT COPY THIS LINE | |
add_filter( 'gravityview_datatables_js_options', function( $dt_config, $view_id, $post ) { | |
$run_on_views = [100,200]; //Change this to the IDs of the Views you'd like to run this filter [100,200,300,...] | |
if( in_array( $view_id, $run_on_views ) ){ | |
$dt_config['lengthChange'] = false; | |
$dt_config['paging'] = false; | |
$dt_config['searching'] = false; | |
$dt_config['ordering'] = false; | |
} | |
return $dt_config; | |
}, 20, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment