Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP body classes bp_get_the_body_class

  • Aide Memoir or food for thought

    BP adds various classes to the $wp_classes array to add to the body class.

    One of those added via the bp_get_the_body_class() function is ‘groups’ this I had proposed using to hook rules to the croups directory however the class ‘groups’ is also generated when in a profile/account page looking at the user_groups screen but also we have a user_groups class added to boot.

    It seems unnecessary to have two classes for roughly the same thing? and proves awkward as I have to now be more specific than I perhaps needed to by using ‘directory’

    Proposal would be to perhaps remove ‘groups’ class from generating on a profile/account user_groups screen and keeping it simply for the directory view?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Seems a bit different in trunk, e.g. http://testbp.org/members/djpaul/groups/. Can’t you just use “.directory.groups” on the selector? It’s always going to pick up “groups” on this page as it always lists the current component

    concatenated selectors are always an option just tend to shy away from those out of habit I guess due to certain browsers historically getting their big girl knickers in a twist with anything so advanced or complex as chaining classes :)

    I’m working exclusively on trunk as well so seeing what that profile/group link shows.

    Hmm yes it’s as it’s a component that’s what I was missing but still disregarding that and simply viewing a semantic token saying ‘groups’ seems unintuitive when on my-groups screen.

    Still it’s really not a massive issue but I tend to favour clear cut tokens groups-dir would be favorable to ‘directory’ ‘groups’ but will live what I’ve got :)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BP body classes bp_get_the_body_class’ is closed to new replies.
Skip to toolbar