Title: Selective widget displaying
Last modified: August 20, 2016

---

# Selective widget displaying

 *  Resolved [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * (@stevejuba)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/)
 * Does anyone know how to have certain widgets appear only on pages you want them
   to as opposed to every single page?
 * Thanks,
 * Steve

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

 *  [Jonas Grumby](https://wordpress.org/support/users/ss_minnow/)
 * (@ss_minnow)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084497)
 * widget logic plugin
 *  Thread Starter [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * (@stevejuba)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084517)
 * Great thank you–Do you know how to simply insert a conditional tag so you can
   have a widget appear in all pages EXCEPT said page as opposed to havin got list
   every single page which could take quite a while…??
 * Thanks again for your help!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084520)
 * `if ( is_page('Foo') ) dynamic_sidebar( 'bar' );?>`
 *  Thread Starter [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * (@stevejuba)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084528)
 * Awesome thank you— what does ‘bar’ equal–the official name of the wiget?
 * i assume ‘foo’ should be replaced with the page that i dont want the bar to appear
   in?
 * also–do I include ;?> within the tag
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084576)
 * ‘bar’ = the id of the widget
    ‘Foo’ = the page name
 * And yes – you need the `?>` tag.
 *  Thread Starter [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * (@stevejuba)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084701)
 * How do I find the id of the widget?
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084702)
 * If you use the widget logic plugin then you can do `!is_page(pagename);`
 * The ! means ‘NOT’ you see.
 *  Thread Starter [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * (@stevejuba)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084703)
 * thanks.
 * so I typed in !is_page(forum);
 * and instead of erasing it from that page I get: Parse error: syntax error, unexpected‘;’
   in /home7/photofly/public_html/photoflymembers/wp-content/plugins/widget-logic/
   widget_logic.php(161) : eval()’d code on line 1
 * Any ideas?
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084704)
 * Ugh, sorry, take out the ; at the end 🙂 My bad, I was thinking code and not 
   logic.
 * My Bad.
 *  Thread Starter [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * (@stevejuba)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084705)
 * awesome!!! thank you
 * what do I type now if I want to have it removed on other pages as well?
 * thanks again
 *  Thread Starter [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * (@stevejuba)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084706)
 * ONE more question!
 * Now that the widgets are gone there is this extra space in the side bar where
   they used to be….any idea how to get rid of that and move it over
 * my guess is its in one of the CSS style sheets somewhere and I would need to 
   edit it out for that specific page??
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084707)
 * > what do I type now if I want to have it removed on other pages as well?
 * If you want it off ALL pages, use `!is_page()`
 * If you want it off selected pages, it’s `!is_page( array('page1','page2','page3'))`
 * > Now that the widgets are gone there is this extra space in the side bar where
   > they used to be….any idea how to get rid of that and move it over
 * Again, depends on how you want the sidebars gone. If it’s ALL pages, you can 
   make a page.php templte file for all pages and omit the sidebar. If it’s SPECIFIC
   pages, you can do similar with page templates.
 * See [http://codex.wordpress.org/Pages#Page_Templates](http://codex.wordpress.org/Pages#Page_Templates)
 *  Thread Starter [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * (@stevejuba)
 * [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084709)
 * awesome—thanks a lot!

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

The topic ‘Selective widget displaying’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 4 participants
 * Last reply from: [stevejuba](https://wordpress.org/support/users/stevejuba/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/selective-widget-displaying/#post-2084709)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
