Title: Dynamic Content in Sidebar
Last modified: August 18, 2016

---

# Dynamic Content in Sidebar

 *  [masonchumpia](https://wordpress.org/support/users/masonchumpia/)
 * (@masonchumpia)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/dynamic-content-in-sidebar/)
 * There are some arguments in the 1.5 Default theme that provide a pretty solid
   way of displaying dynamic content. For example, from sidebar.php of the Default
   theme:
 * <?php /* If this is a category archive */ if (is_category()) { ?>
 * Any content following that tag will only be displayed if the user is viewing 
   entries organized by category. Is there any way to provide an argument where 
   content can be displayed in the sidebar if and only if the user is viewing comments
   for an entry?

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

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/dynamic-content-in-sidebar/#post-161011)
 * `is_single()` will verify if you’re viewing a single post page, but since the
   default theme doesn’t use the sidebar when on an individual post, it would need
   to be tested in another template (like say single.php).
 * If you *want* the sidebar on single posts, you could use my mod of the default
   theme:
    [http://wordpress.org/support/topic.php?id=25616](http://wordpress.org/support/topic.php?id=25616)
 *  [aaronws](https://wordpress.org/support/users/aaronws/)
 * (@aaronws)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/dynamic-content-in-sidebar/#post-161415)
 * Are there any constants that can be used to test for certain pages? E.g.
 * if page == my_resume then
    create resume menu else if page == my_gallery then
   create gallery menu
 * I would like to change the sidebar contents with every page.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/dynamic-content-in-sidebar/#post-161416)
 * I think Kaf gave me some excellent solutions [here](http://wordpress.org/support/topic/26073)
   for a similar request of mine – see the code with the page_id.
 *  [mush](https://wordpress.org/support/users/mush/)
 * (@mush)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/dynamic-content-in-sidebar/#post-161501)
 * How can I suppress sidebar content on single page posts? (Not all of it, but 
   certain elements.)

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

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

 * 4 replies
 * 5 participants
 * Last reply from: [mush](https://wordpress.org/support/users/mush/)
 * Last activity: [20 years, 2 months ago](https://wordpress.org/support/topic/dynamic-content-in-sidebar/#post-161501)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
