Title: [Plugin: Multiple Sidebars] Adding return value to method dynamic_sidebar()
Last modified: August 20, 2016

---

# [Plugin: Multiple Sidebars] Adding return value to method dynamic_sidebar()

 *  [JochenT](https://wordpress.org/support/users/jochent/)
 * (@jochent)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-multiple-sidebars-adding-return-value-to-method-dynamic_sidebar/)
 * I’ve played a bit with plugin and I am excited.
 * I want suggest one small improvement. In the case a sidebar is defined in a post/
   page but itself is set to status draft the method `$MultipleSidebars->is_active_sidebar()`
   returns true although no sidebar is shown. In this case it would be desirable
   to have a possibility to display a fallback sidebar.
    This could be reached if
   method `$MultipleSidebars->dynamic_sidebar()` returns a boolean value from the
   calls to the original WP function dynamic_sidebar(). As this call may executed
   multiple times in your method I use following modification:
 *     ```
       $success = false;
        // ...
        $success = dynamic_sidebar($sidebar) ? true : $success;
        // ...
        return $success;
       ```
   
 * [http://wordpress.org/extend/plugins/multiple-sidebars/](http://wordpress.org/extend/plugins/multiple-sidebars/)

The topic ‘[Plugin: Multiple Sidebars] Adding return value to method dynamic_sidebar()’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/multiple-sidebars_a4a4a4.svg)
 * [Multiple Sidebars](https://wordpress.org/plugins/multiple-sidebars/)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-sidebars/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [JochenT](https://wordpress.org/support/users/jochent/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-multiple-sidebars-adding-return-value-to-method-dynamic_sidebar/)
 * Status: not resolved