Title: [Plugin: WP Maintenance Mode] Loading dynamic sidebar in theme
Last modified: August 20, 2016

---

# [Plugin: WP Maintenance Mode] Loading dynamic sidebar in theme

 *  [bazze](https://wordpress.org/support/users/bazze/)
 * (@bazze)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-maintenance-mode-loading-dynamic-sidebar-in-theme/)
 * Hello!
 * I’m trying to make a sidebar on the maintenance page and have done the following
   in my themes functions.php-file:
 *     ```
       if ( function_exists('register_sidebar') ){
       	register_sidebar(array(
       		'id' => 'maintenance-sidebar',
       		'name' => 'Maintenance sidebar',
               'before_widget' => '<div id="maintenance_sidebar">',
               'after_widget' => '</div>',
               'before_title' => '',
               'after_title' => '',
       	));
       }
       ```
   
 * Then I added the following to site.php in the wp-maintenance-mode plugin folder:
   `
   <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('maintenance-
   sidebar')) { echo "<!-- error -->"; } ?>`
 * To me this should work (the sidebar appears in the Widgets admin page and it’s
   fully possible to drag widgets to it), but all I get is the <!– error –> printed
   out. HOW CAN THIS BE? Is it something that doesn’t get loaded when you’re in 
   the plugin vs. when you implement it in an ordinary theme? Please help! I’m clueless.
 * [http://wordpress.org/extend/plugins/wp-maintenance-mode/](http://wordpress.org/extend/plugins/wp-maintenance-mode/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [bazze](https://wordpress.org/support/users/bazze/)
 * (@bazze)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-maintenance-mode-loading-dynamic-sidebar-in-theme/#post-2283728)
 * No one has any idea how to solve this in a neat way?

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP Maintenance Mode] Loading dynamic sidebar in theme’ is closed
to new replies.

 * ![](https://ps.w.org/wp-maintenance-mode/assets/icon-256x256.gif?rev=3027645)
 * [LightStart - Maintenance Mode, Coming Soon and Landing Page Builder](https://wordpress.org/plugins/wp-maintenance-mode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-maintenance-mode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-maintenance-mode/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-maintenance-mode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-maintenance-mode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-maintenance-mode/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [bazze](https://wordpress.org/support/users/bazze/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-maintenance-mode-loading-dynamic-sidebar-in-theme/#post-2283728)
 * Status: not resolved