Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to show a plugin in a specific page's sidebar only.

For Example: I have the pages like ..

  • home
  • about us
    • sub page 1
    • sub page 2
    • sub page 3
    • sub page 4

UPdate:

i want to show, plugin 1 in sub page 1 and sub page 4 only and not to all other pages.i tried is_page('sub page 1','sub page 4') but not working :(.please help me.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

The way to use is_page with multiple pages is as follows:

is_page(array(42,'about-me','Contact'));

You have to use the array keyword

share|improve this answer
add comment

You may try Widget Logic plugin. It let you define via a simple expression like is_page or is_single, if the widget has to be shown.

share|improve this answer
    
here i can't activate "plugin 1" for "sub page 1" && "sub page 3" only.how to use?i tried ->is_page('sub page 1')&&is_page('sub page 2').but it won't show both pages.please help me.. –  Ramkumar Jul 18 '11 at 11:48
    
view here i posted in wp forum too. –  Ramkumar Jul 19 '11 at 5:57
    
See the answer of Lea. –  keatch Jul 19 '11 at 7:24
add comment

Conditional Widgets and Widget Logic plugin work at the Widget level. If you are using the Genesis Framework, the Genesis Simple Sidebar plugin let's you create additional sidebars, and designate which pages they appear on.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.