Title: [plugin: widget-logic]php code/conditionals help
Last modified: August 19, 2016

---

# [plugin: widget-logic]php code/conditionals help

 *  [vengeancefury](https://wordpress.org/support/users/vengeancefury/)
 * (@vengeancefury)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-widget-logicphp-codeconditionals-help/)
 * I’m using widget-logic plugin and I need some help with conditional statements:
   I am trying to make a widget display only on 3 specific pages….and I am not sure
   how to do this. I’ve tried this:
    if (is_home()) {} elseif (is_page(‘3′)) {} 
   elseif (is_page(’49’)) {} I’ve also tried this: is_page(‘3”49’) and this: is_page(‘
   3′) or is_page(’49’) or is_home() and this: is_page(‘3′) || is_page(’49’) || 
   is_home() I’m pretty new to php…I’m learning through tweaking the given code 
   within wordpress docs. Thanks for any help anyone gives.

Viewing 1 replies (of 1 total)

 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-widget-logicphp-codeconditionals-help/#post-802406)
 * [http://wordpress.org/support/topic/176834](http://wordpress.org/support/topic/176834)

Viewing 1 replies (of 1 total)

The topic ‘[plugin: widget-logic]php code/conditionals help’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [alanft](https://wordpress.org/support/users/alanft/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-widget-logicphp-codeconditionals-help/#post-802406)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
