Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem with Widget Logic and members pages


  • Piotr Kunicki
    Participant

    @kuperman87

    Hello,

    My WP version is 4.1.1
    BuddyPress version is 2.2.1 and I’ve tested default TwentyFifteen theme.
    I have a problem with Widget Logic (and another plugin which uses similar WordPress conditional tags) plugin, when I’m trying to add widget and specify in the widget logic:

    
    is_page('19')
    

    The widget is visible on page with id 19, but also on all member and group pages. I think that the problem is connected with the fact that body class on these pages looks like:

    
    page page-id-0
    

    in the previous version of BP, single member and groupp pages have id of the parent page (i.e. Members)

    Any idea how to solve the issue?

Viewing 4 replies - 1 through 4 (of 4 total)

  • Henry Wright
    Moderator

    @henrywright

    I’ve had problems when using is_page() in BuddyPress in the past. In addition to that conditional, try putting in further checks such as bp_is_groups() or bp_is_friends() (or whatever is relevant to your task).

    See here for a list of template tags available:

    Template Tag Reference


    Piotr Kunicki
    Participant

    @kuperman87

    Thank you for the answer but isn’t it a kind of BuddyPress bug?

    If I’m using is_page(), with page id or slug which is the default WordPress conditional tag, it’s obvious, that I want to display this widget only on this page, no on the all of the group or member single pages.

    In the previous version I don’t have this issue. Can this be reported to BuddyPress dev team?


    Henry Wright
    Moderator

    @henrywright

    Can this be reported to BuddyPress dev team?

    You can report bugs using Trac:

    https://buddypress.trac.wordpress.org/

    Your login details will be the same as those you use here in the forums.


    Piotr Kunicki
    Participant

    @kuperman87

    It’s known issue and will be fixed in WordPress 4.2

    More informations may be found in this tread:
    https://buddypress.org/support/topic/version-2-2-0-and-is_page/#post-234315

    Thanks for the help, problem solved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem with Widget Logic and members pages’ is closed to new replies.
Skip to toolbar