0

So I have 5 main navigation areas, and I am trying to have each sections pages have their own specific left sidebar/menu.

For example, all pages in the 'about' section should use the 'about menu'. I've got Widget logic working for one page using

is_page('about')

That works for that one page. I tried to use is_array( listing the page names) but that didn't work.

  • Can you post your code? Else it is hard to help. Btw, I guess you meant to use the function in_array() not is_array(). – JHoffmann Feb 1 '17 at 21:24
  • According to the plugin, no code changes are required. – pixelneer Feb 1 '17 at 21:45
  • Putting is_page( 'about' ) somewhere is a code change. – JHoffmann Feb 1 '17 at 21:56
  • is_page ('about') is the entirety of the code that is entered onto the widget. – pixelneer Feb 2 '17 at 13:53
  • Then you are asking about inputting code into the third party plugin's widget which renders the question off-topic here. – JHoffmann Feb 2 '17 at 23:44
0
<?php 

if(is_page("about")){

.... do aomething...; 

}elseif(is_page("contact")){

...do aomething...; 

}elseif (...){

... 


}. . . 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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