Jump to content
Sign in to follow this  
samyone

Widget-Logic conditional Tag

Recommended Posts

samyone

Hi, everybody I used widget-logic to display different widget on different page and specify widget_logic with conditionnal tag like is_page('ID page'). It's because when i used is_page ('name-of-the-page'), i have an error. But, it the great solution if you want to use it with subnav. I want to know if it possible to specify in the tag conditional more than one value ? For example : is_page('ID1','ID2'), i want to display the same widget in two different pages. Thanks !

Share this post


Link to post
Share on other sites
arretx

Yes, it is possible, but you need to do it as an array. I believe something like is_page(array(1,2,3)) would work. -or- is_page(x) && is_page(x)

Share this post


Link to post
Share on other sites
samyone

Yeah, Great it do the best !! Thanks Shaun, it's the second choice is_page('ID1') || is_page('ID2'). Why I don't see it earlier. In fact, sometimes it's necessary to read the FAQ's plugin.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×