Support » Plugin: TablePress » Table Options – Changing Default Options

  • Resolved Nick McBurney



    Just wondering if it would be possible to change the default options for tables e.g. if would be preferential for me to have all the options un-ticked except ‘Row Hover Highlighting’.

    Im quite comfortable editing code and could just do with knowing what I need to change.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Plugin Author TobiasBg


    Hi Nick,

    thanks for your question.

    Yes, something like this is possible by using a filter hook to set new default values. You will need the latest version from the “master” branch from the GitHub repository at (or wait for TablePress 0.7-beta, which will be out some time next week).
    After that, you can create a small plugin from the following code (or paste it into your theme’s “functions.php”):

    add_filter( 'tablepress_table_template', 'tablepress_change_default_values' );
    function tablepress_change_default_values( $default_table ) {
    	$default_table['options']['table_head'] = false;
    	$default_table['options']['table_foot'] = false;
    	$default_table['options']['alternating_row_colors'] = false;
    	$default_table['options']['row_hover'] = true;
    	$default_table['options']['print_name'] = false;
    	$default_table['options']['print_description'] = false;
    	$default_table['options']['use_datatables'] = false;
    	return $default_table;


Viewing 1 replies (of 1 total)
  • The topic ‘Table Options – Changing Default Options’ is closed to new replies.