Title: Dynamic Sidebar Issue
Last modified: August 30, 2016

---

# Dynamic Sidebar Issue

 *  [craigs85](https://wordpress.org/support/users/craigs85/)
 * (@craigs85)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/dynamic-sidebar-issue/)
 * Hi there,
    I’m trying to display a dynamic sidebar I’ve created on a custom page
   template.
 * I’ve added this to functions:
 *     ```
       if ( function_exists('register_sidebar') ) {
       	register_sidebar(array(
       		'name' => 'Shop Sidebar',
       		'id' => 'shop-sidebar',
       		'description' => 'Sidebar on Shop Pages',
       		'before_widget' => '<li id="%1$s">',
       		'after_widget' => '</li>',
       		'before_title' => '<h2>',
       		'after_title' => '</h2>',
       	));
       }
       ```
   
 * I’ve created a sidebar-shop.php with the following:
 *     ```
       <p>shop sidebar file</p>
       <div id="secondary" class="sidebar-container" role="complementary">
       	<div class="widget-area">
       		<?php dynamic_sidebar( 'shop-sidebar' ); ?>
       	</div><!-- .widget-area -->
       </div><!-- #secondary -->
       ```
   
 * And on my page template, I’ve added this:
 * `<?php get_sidebar('shop'); ?>`
 * Its getting the correct sidebar-shop file, because I’m getting the ‘shop sidebar
   file’ paragraph at the top, but the actual widgets I’ve dragged onto this sidebar
   don’t appear.
 * Could anybody help please?
 * Thanks,
    Craig

The topic ‘Dynamic Sidebar Issue’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [craigs85](https://wordpress.org/support/users/craigs85/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/dynamic-sidebar-issue/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
