Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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
    mareva

    #277038

    Hey 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!
    Peter

    #277450

    Hi 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.

    #277852

    Hey!

    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,
    Devin

    #279618

    Hi!
    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.

    #279932

    Hi!

    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,
    Peter

    #280486

    ok, 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘BBpress & Widget Logic’ is closed to new replies.