-
AuthorPosts
-
June 10, 2014 at 5:23 pm #277023
Hi!
I’m trying to use specific widgets for the BBpress forum sidebar, especially to hide some widgets that are defined in the “displayed everywhere” area (in dashboard > Appearence > Widgets).
For the moment, some of these widgets are defined with widget logic tags like :
!is_page(‘page_name’). This works good.
or
!is_bbpress(). This works good too (the widget is not displayed in the forum pages).The trouble is : when adding conditionnal tags like || or &&, the !is_bbpress() is not interpreted anymore.
eg: !is_page(‘page_name’) || !is_bbpress()
(that means : widget is not displayed in the page called “page_name” nor in the bbpress forum pages).I ‘ve already ask to the BBpress support what I should do to solve this. It replied to try with this code : !is_page(‘page_name’) || (is_single() && !is_bbpress()).
Unfortunatly, it doesn’t work.
Then BBpress support suggested me to contact the Widget Logic support. I did it… but it seems to be not so reactiv.
Well… maybe somebody already met this trouble and could give me an advice?best regards
marevaJune 10, 2014 at 5:46 pm #277038Hey mareva!
I couldn’t get is_bbpress conditional to work with widget logic too. Thus I used this expression:
(is_post_type_archive('forum') || is_singular(array('forum', 'topic', 'reply')))
for a private project I worked on. I’m not sure if it also works for you but it’s worth a try.
Cheers!
PeterJune 11, 2014 at 9:46 am #277450Hi Peter,
Thank you for your quick answer.
I’ve just tried your solution and made some other tests… without any valid result.
In fact, I think the operator OR (||) doesn’t work with in any conditonal tags when used in a widget logic box area.
I mean, when using alone any conditional tag, then it’s ok : is_post_type_archive(‘forum’), is_singular(array(‘forum’, ‘topic’, ‘reply’), is_page(‘page_name’), is_single()…
But when combinating two of them with the || operator, then any of these 2 conditions is working anymore.Well… maybe it’s just linked to my configuration (I just don’t know why…). grrrr!
Have a nice day.
m.June 12, 2014 at 1:20 am #277852Hey!
I’ve used http://wordpress.org/plugins/display-widgets/ quite a bit which you might want to try too. Worth a shot at least :)
Best regards,
DevinJune 16, 2014 at 6:37 pm #279618Hi!
Thank you for this : it works much more better!
Whatever, it remains something I can’t do with this plugin and that is linked to the bbPress search functionality.
For any widget I would like to display in the forum pages (forum index, topics, reply, search…), I’ve checked all Display Widget options related to the forums pages and functonalities.
It works well except for the bbPress result page where the widgets are not displayed.
Url for these pages looks like : “http://www.my-site.com/search/keywords/” where “keywords” are words used is the bbpress search form.
Any idea to help to display my widget even in these pages?Hum… maybe I’m not so clear…
regards
m.June 17, 2014 at 11:28 am #279932Hi!
No, tbh I’ve also no idea it this point. If you’re familiar with xdebug and IDEs like PHPStorm or Netbeans I recommend to debug the code – maybe you can find the reason why bbpress doesn’t like the condtional logic. If you’re not familiar with php debugging I recommend to hire someone (i.e. here http://studio.envato.com/ ) who can help you to set up bbpress and the widgets properly
Best regards,
PeterJune 18, 2014 at 12:06 pm #280486ok, thank you for your answer.
Indeed, I don’t know a word in php and I’m quite a new wp user… then it will be complicate to me to solve this.
Nevermind, I’ll post a topic on bbPress forum and I hope somebody already met the same issue!
Best regards,
m. -
AuthorPosts
- The topic ‘BBpress & Widget Logic’ is closed to new replies.