Creating a global tag to style single members page
It’s late in the day (in my part of the world) so maybe my eyes are just tired, but I’m trying to apply a style to a single members page however BP seems to be lacking a global tag for a members page. The body class changes depending on which content tab is selected (i.e. Activity | Profile | Friends | Groups | Blogs | Messages | Followers | Following | Settings).
I added the class name ”profile-single” within ’members/single/home.php’ which solves my problem for core BP pages ( i.e. Activity | Profile | Friends | Groups | Blogs ) but not for the pages/tabs generated by plugins.
Initially I thought I could just modify the ’members/single/plugins.php’, but that doesn’t change the generated code, otherwise I’ve been trying to find the hook ’bp_before_member_plugin_template’ and create a modified version of this in my bp-custom.php.
Any suggestions? Also whereabouts are the ’bp_before’ and ’bp_after’ hooks defined? I remember spotting them some while ago, but can’t remember where.
Update: I can see in the members/single/followers.php file within the follow plugin, that it duplicates the markup of the member/single/home.php, so it looks like there is no single ‘header’ tag which would work across all tabbed pages. So therefore I am looking for a hook where I can add a class to, but I’m not entirely clear how that’s going to work in practice.
I’ll keep looking, but as ever I’d appreciate any suggestions.
- The topic ‘Creating a global tag to style single members page’ is closed to new replies.