WP Maintenance Mode
Loading dynamic sidebar in theme (2 posts)

  1. Bazze
    Posted 4 years ago #


    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') ){
    		'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.


  2. Bazze
    Posted 4 years ago #

    No one has any idea how to solve this in a neat way?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Maintenance Mode
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic