hi there – Widget Logic guy here!
check http://codex.wordpress.org/Conditional_Tags for examples of how to use conditional tags. the example they give there for checking category slugs is
is_category('blue-cheese')
and something like that should work for you in widget logic. if not let me know.
can I just jump in on this conversation? I tried to psot on the plugins homepage, but had connection problems so ehre I go:
I have 2 sidebars, with both showing on the homepage but only one on all other pages. So I need to use your plugin, to make 2 widgets from sidebar 1 to disappear on the homepage.
I tried !is_home() for both widgets, but as soon as I save,both conditions disappear. It seems to work fine if I only use this condition on one widget, but as soon as I use this condition ob two widgets, like I said, the conditions both disappear…
any clue what could be wrong? did you test your plugin in a similar situation?
can you try and use !is_home() on two widgets, and then save and see if that works for you?
yes i have tested such a setup – i have quite a complex setup with lots of widgets and logic text for each.
but have you got the newly released version 0.42 – there were some problems with 0.4 and losing settings under certain circumstances. not seen that with 0.42 yet in my ‘lab’ setup.
(mind you i haven’t done much testing with multiple sidebars – must get on that…)
yes I do have the latest version…
I also experienced another glitch: after saving some settings, all of a sudden the field where I could input the “logic” was gone – I had to check: “Use ‘widget_content’ filter?” again to make that field appear again.
would you want to help out? if so, I could give you a temp. access.
definitely – that would be very helpful. are you using the ‘cancel’ button on the widgets BTW?
also 🙁
really thought i’d caught all these ‘dropouts’. any help you can give to track these down would be appreciated.
please drop me an email: ovidiu at pacura dot ru – I will reply with access data to the site I do currently have problems with.
hi – not got any e-mail yet, but…
i think i found a way to lose widget logic text that shouldn’t happen that i missed in 0.42. so i’ve made a quick 0.43 release to patch that. let me know how you find it.
sorry man I got home yesterday at about 19 o’clock, and fell asleep shortly after. And as I can’t access my private mails from work, I’ll have to test your new 0.43 version. I’ll let you know how it goes.
ok, works better. I still had the problem that the widget logi field disappeared, but after completely deactivating and reactivating the plugin, it worked…
works now. you can see the result here: http://pacura.ru you’ll notice on the homepage there are 2 sidebars, while everzwhere else there is only one. And the content from the disappearing sidebar magicaly appears in the remaining sidebar 🙂 although I am not sure I will leave it there, as I am still testing, modifying the layout.
THX a lot for this great plugin. now widgets are almost as good as sidebar modules, maybe you know that plugin? maybe you could use it as an inspiration for your plugin? there are still a lot of nice features that plugin has… but unfortunately it is no longer developed. http://nybblelabs.org.uk/projects/sidebar-modules/
!!! wow no i had not seen that plugin before – looks like i need to dig into what it does exactly.
also glad to hear 0.43 has improved things for you.
(i was never really clear on the ‘cancel’ button on widgets, and now i see it’s meant to be a ‘forget changes’ button rather than a reset to default values. just me being dense.)
if you can get your plugin to do what that plugin did, you can sell it 🙂
unfortunately that plugin only worked up to wp 2.something I think, if I remember right, there was a hack floating around so it worked with 2.3 but it is really worth looking into.
i’d like to jump in on this conversation…. I need some help with conditional statements: I am trying to make a widget display only on 3 specific pages….and I am not sure how to do this. I’ve tried this:
if (is_home()) {} elseif (is_page('3')) {} elseif (is_page('49')) {}
I’ve also tried this:
is_page('3''49')
and this:
is_page('3') or is_page('49') or is_home()
and this:
is_page('3') || is_page('49') || is_home()
I’m pretty new to php…I’m learning through tweaking the given code within wordpress docs.
Thanks for any help anyone gives.
the last one should work. all i can suggest is: try putting it in parenthesis?
( is_page(‘3′) || is_page(’49’) || is_home() )