Title: Category-Specific Sidebars
Last modified: August 18, 2016

---

# Category-Specific Sidebars

 *  [mobiustrip44](https://wordpress.org/support/users/mobiustrip44/)
 * (@mobiustrip44)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/category-specific-sidebars/)
 * I am trying to figure out how to create custom category sidebars that can appear
   on individual post pages as well as category archive pages. Some posts may have
   two categories — one of which will always be the same ID, which will not need
   its own custom sidebar.
 * So the logic is: If the current page is an individual post and (excluding y) 
   the individual post has a category ID of x, then display sidebar-x.php. If the
   current page is a category archive, and the category ID is x, then display sidebar-
   x.
 * Can anyone help me with this?

The topic ‘Category-Specific Sidebars’ is closed to new replies.

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [else](https://wordpress.org/support/topic-tag/else/)
 * [if](https://wordpress.org/support/topic-tag/if/)
 * [specific](https://wordpress.org/support/topic-tag/specific/)

 * 0 replies
 * 1 participant
 * Last reply from: [mobiustrip44](https://wordpress.org/support/users/mobiustrip44/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/category-specific-sidebars/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
