Title: code in sidebar.php
Last modified: August 21, 2016

---

# code in sidebar.php

 *  [hiske555](https://wordpress.org/support/users/hiske555/)
 * (@hiske555)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/code-in-sidebarphp/)
 * Hi,
    I like the plugin very much so far. The only thing i can’t figure out is
   how to replace my code in sidebar.php. This is my Original code:
 *     ```
       <?php
   
       if ( is_active_sidebar( 'sidebar' ) && wpex_sidebar_enabled() == true ) : ?>
           <aside id="sidebar" class="sidebar-container sidebar-primary" role="complementary">
       		<?php dynamic_sidebar( 'sidebar' ); ?>
           </aside><!-- #sidebar -->
       <?php endif; ?>
       ```
   
 * I replaced this code with:
 *     ```
       <?php
        global $MultipleSidebars;
        $MultipleSidebars -> dynamic_sidebar();
        ?>
       ```
   
 * This shows the sidebars i created, but they are not sidebars anymore. The sidebars
   are located underneath the page content instead of on the right of the page.
   
   Hope you can help!
 * [http://wordpress.org/plugins/multiple-sidebars/](http://wordpress.org/plugins/multiple-sidebars/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Andrico](https://wordpress.org/support/users/andrico/)
 * (@andrico)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-in-sidebarphp/#post-4355038)
 * Hi hiske555
    Sorry for the delay. 🙁
 * [code]
    <?php
 * if ( is_active_sidebar( 'sidebar' ) && wpex_sidebar_enabled() == true ) : ?>
   
   <aside id="sidebar" class="sidebar-container sidebar-primary" role="complementary"
   > <?php global $MultipleSidebars; $MultipleSidebars -> dynamic_sidebar(); ?> 
   </aside><!-- #sidebar --> <?php endif; ?> [/code]
 *  Plugin Author [Andrico](https://wordpress.org/support/users/andrico/)
 * (@andrico)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/code-in-sidebarphp/#post-4355039)
 *     ```
       <?php
   
       if ( is_active_sidebar( 'sidebar' ) && wpex_sidebar_enabled() == true ) : ?>
       <aside id="sidebar" class="sidebar-container sidebar-primary" role="complementary">
       <?php
       global $MultipleSidebars;
       $MultipleSidebars -> dynamic_sidebar();
       ?>
       </aside><!-- #sidebar -->
       <?php endif; ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘code in sidebar.php’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Andrico](https://wordpress.org/support/users/andrico/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/code-in-sidebarphp/#post-4355039)
 * Status: not resolved