- This topic has 6 replies, 3 voices, and was last updated 9 years, 3 months ago by
Tom.
-
AuthorPosts
-
October 21, 2014 at 7:12 am #40623
Stephane
Hello Tom,
The “Page Header” Add-on seems not to be working with a activity, groups or members page. Do you have this issue? Is it compatible?
Thanks,
Stephane.October 21, 2014 at 9:34 am #40653Tom
Lead DeveloperLead DeveloperHi Stephane,
BuddyPress sets these pages up like a WordPress blog, which ignores any metabox options set on the page itself (unfortunately).
As of right now, you would have to use GP Hooks to add a page header to these pages (I can provide code if you like).
In the future, I plan on having a settings page that allows you to set a header easily on the Blog, and on BuddyPress pages (plus more) – just trying to figure out the best way to approach it.
Let me know if you’d like the code for GP Hooks 🙂
Thanks!
October 21, 2014 at 11:58 am #40681Stephane
Thanks. Yes, I would like to have the process. Thanks.
October 22, 2014 at 4:27 pm #41042Tom
Lead DeveloperLead DeveloperOk, here we go 🙂
First off, you’ll need to use GP Hooks – we’ll be working inside the “After Header” hook.
Basically, we need to target which BuddyPress page we’re on using PHP.
Luckily, BP provides us with some conditionals to work with: https://codex.buddypress.org/developer/bp-is-active/
So to target the activity page, we would do this inside the hook:
https://gist.github.com/generatepress/ba49bc497a9571038a42
Then we would duplicate the above for the other components, the only important part is to change the name of the component on this line:
<?php if ( bp_is_active( 'activity' ) ) { ?>So the above would be for the activity page.
This would be for the groups page:
<?php if ( bp_is_active( 'groups' ) ) { ?>And so on.
It’s complicated, but achievable.
Like I said – I hope to add options to use the Page Header addon on all of these pages.
Let me know if you have any issues 🙂
October 23, 2014 at 2:58 am #41149Stephane
Whooo! Thanks you very much! I try it and I give you a return.
November 8, 2016 at 7:32 am #242626Dorian
Hey Tom,
I bought GP a couple days ago.
I’m trying to style the BP related pages a bit, especially the Profile Page. Eg hiding the title..
There was no further development in this direction or?Best regards,
DorianNovember 8, 2016 at 10:01 am #242665Tom
Lead DeveloperLead DeveloperHi Dorian,
It would be best if you could create a new topic with more details on what you’re trying to achieve. Then I’ll try my best to help you 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.