Title: Widget Logic  &#8211; Array Code
Last modified: August 19, 2016

---

# Widget Logic – Array Code

 *  Resolved [cydneymikel](https://wordpress.org/support/users/cydneymikel/)
 * (@cydneymikel)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/widget-logic-array-code/)
 * I’m trying to have my side bar display the same items on the main blog page and
   on each individual post page. Right now my short code is is_home()
 * [http://www.crownedstudiosalon.com/blog/](http://www.crownedstudiosalon.com/blog/)
 * I would think this short code would be:
 * is_home() && is_category()

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

 *  Thread Starter [cydneymikel](https://wordpress.org/support/users/cydneymikel/)
 * (@cydneymikel)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/widget-logic-array-code/#post-1182648)
 * anyone?
 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/widget-logic-array-code/#post-1182649)
 * the main blog page = is_home()
    each individual post page = is_single()
 * if you want it to be true when it’s the main blog page or a single then you want
 * is_home() || is_single()
 *  Thread Starter [cydneymikel](https://wordpress.org/support/users/cydneymikel/)
 * (@cydneymikel)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/widget-logic-array-code/#post-1182654)
 * brilliant! works perfectly, thank you!

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

The topic ‘Widget Logic – Array Code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [cydneymikel](https://wordpress.org/support/users/cydneymikel/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/widget-logic-array-code/#post-1182654)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
