Title: D
Last modified: August 20, 2016

---

# D

 *  Resolved [Mario Malcangi](https://wordpress.org/support/users/mariowp/)
 * (@mariowp)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/different-sidebar-dont-work/)
 * i apply this code instead <?php get_sidebar ?> in the single.php:
 *     ```
       <?php if (is_category('test')) {
       get_sidebar('courses'); //sidebar-courses.php
       } else {
       get_sidebar();
       }; ?>
       ```
   
 * display always default sidebar
 * please help me

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

 *  [Riversatile](https://wordpress.org/support/users/riversatile/)
 * (@riversatile)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/different-sidebar-dont-work/#post-3232032)
 * Hi,
 * You have to change the sidebar name that is called.
 *  [phe.le](https://wordpress.org/support/users/phele/)
 * (@phele)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/different-sidebar-dont-work/#post-3232036)
 * Open sidebar-courses.php and change dynamic_sidebar() to your registered courses
   sidebar. For example: dynamic_sidebar(‘Courses Sidebar);
 * Otherwise check out this great plugin [http://wordpress.org/extend/plugins/widget-logic/](http://wordpress.org/extend/plugins/widget-logic/)
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/different-sidebar-dont-work/#post-3232040)
 * `is_category()` only works for category archive psges;
 * in a single.php, try to use:
 * `in_category()`
 *  Thread Starter [Mario Malcangi](https://wordpress.org/support/users/mariowp/)
 * (@mariowp)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/different-sidebar-dont-work/#post-3232075)
 * thanks alchymyth… it’s work with in_category
    🙂

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

The topic ‘D’ is closed to new replies.

## Tags

 * [single.php](https://wordpress.org/support/topic-tag/single-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [Mario Malcangi](https://wordpress.org/support/users/mariowp/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/different-sidebar-dont-work/#post-3232075)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
