Skip to content

Instantly share code, notes, and snippets.

@bogdan-mainwp
Last active December 6, 2018 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan-mainwp/ee1f4677f1c6822fb0ea3348931861f5 to your computer and use it in GitHub Desktop.
Save bogdan-mainwp/ee1f4677f1c6822fb0ea3348931861f5 to your computer and use it in GitHub Desktop.
Custom snippet for making the Select Sites box sticky
<?php
// Add the following code snippet to the functions.php file of the MainWP Customisations plugin
// Download MainWP Customisations here: https://github.com/mainwp/mainwp-customisations
// More about the plugin: https://mainwp.com/mainwp-customisations/
add_action('admin_head', 'sticky_sidebar');
function sticky_sidebar() {
echo '<style>.mainwp_select_sites_box { position: -webkit-sticky; position: sticky; top: 0; }</style>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment