Soliloquy Documentation

Documentation, Reference Materials, and Tutorials for Soliloquy

Set Default Slider Dimensions

Important: This doc assumes you’re comfortable creating and/or editing PHP files in your WordPress installation and is intended for advanced users.

Note: If you prefer changing slider defaults from the Soliloquy interface you can use the Defaults Addon, available with a Developer or Master license.

To change the default slider dimensions for any new sliders that are created, add the following code to your active theme’s functions.php file and change the dimensions to match you specific needs:

add_filter( 'soliloquy_defaults', 'tgm_soliloquy_default_settings', 20, 2 );
function tgm_soliloquy_default_settings( $defaults, $post_id ) {
    
    $defaults['slider_width']  = 800; // Slider width.
    $defaults['slider_height'] = 400; // Slider height.
    
    return $defaults;
    
}
[i]
[i]