• Resolved dcurran

    (@dcurran)


    I’m wondering if there is a way to set a specific responsive mode by default when using the “Responsive Tables” addon? For example, having all tables use “stack” by default so it’s not necessary to include in the shortcode unless a different mode is needed?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Yes, this is possible! Please try adding this to the end of your theme’s “functions.php” file:

    add_filter( 'tablepress_shortcode_table_default_shortcode_atts', 'dcurran_tablepress_responsive_stack_default', 11 );
    function dcurran_tablepress_responsive_stack_default( $default_atts ) {
    	$default_atts['responsive'] = 'stack';
    	$default_atts['responsive_breakpoint'] = 'phone';
    	return $default_atts;
    }

    Regards,
    Tobias

    Thread Starter dcurran

    (@dcurran)

    This worked perfectly. Thanks!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Set responsive mode by defualt?’ is closed to new replies.