Documentation

Print This page

Default Theme Background Image (Hook)

If you are using LoginPress plugin on the multisite setup and you want to change the default LoginPress theme background image on all websites.

The following filter will help you to change the default background image on all websites. Simply you need to add the following code given below in your main website’s child theme’s file functions.php and update the file.

function loginpress_default_bg_callback( $background ) {
$background = 'https://cdn.pixabay.com/photo/2019/07/19/09/40/flowered-balloon-flower-4348351_960_720.jpg';
return $background;
}
add_filter( 'loginpress_default_bg', 'loginpress_default_bg_callback' );

Here $background contains the URL for the background image. Make sure the image is optimized, otherwise it can cause the login page to load slow.

That’s how you can easily change the default login page background image on all websites. Check our complete guide on how to disable social login buttons on login widget.