This is from http://ww.wp.xz.cn/extend/plugins/widget-logic/faq/ “Widgets appear when they shouldn’t”
your logic for the widget that is appearing when it shouldn’t probably has something like in_category(x) and it needs to be is_single() && in_category(x)
Thread Starter
Oazar
(@oazar)
All right, I tried to do things like that. But what I need is the widget to appear if I am in the category page as well as on a post page.
So I must be very clumsy, but I cannot find the good way to write it.
what I iould need is a way to say : “never on homepage”… it doesn’t exist ?
Check http://ww.wp.xz.cn/extend/plugins/widget-logic/faq/ “How do I get a widget to appear both on a category page and on single posts within that category?”
Thread Starter
Oazar
(@oazar)
Thanks for your help, but I already have the widget appearing both in category AND post.
I just want to prevent it displaying on home page.
what’s the logic you are using?
Thread Starter
Oazar
(@oazar)
This is what I wrote, which is efficient. The widget appears when it should.
My only problem concerns the homepage : I need a way to prevent the widget to dispolay on the homepage, whatever posts are displayed on this page.
in_category(‘Prochainement’)||is_category(‘Cinéma’)||in_category(‘Cinéma’)||is_category(‘Prochainement’)||in_category(‘Spectacles’)||is_category(‘Spectacles’)||in_category(‘Espace Jean Vilar’)||is_category(‘Espace Jean Vilar’) || in_category(‘Galerie Julio Gonzalez’) || is_category(‘Galerie Julio Gonzalez’) || is_category(‘Université Populaire d\’Arcueil’) || in_category(‘Université Populaire d\’Arcueil’)||in_category(‘Médiathèque’)||is_category(‘Médiathèque’)||in_category(‘Pratiquer’)||is_category(‘Pratiquer’)||in_category(‘Artistes’)||is_category(‘Artistes’)
all of the instances of in_category(…) need to be (is_single() && in_category(…))
Thread Starter
Oazar
(@oazar)
All right !
thanks so much alanft, I’ll try this !