BP 2.4.0 – Group frontpage hierarchy question
-
I am not finding front.php in the new buddypress zip as given in the template hierarchy changes? Where can i find that?
-
@paragbhagwat – I’ve split your reply into a separate topic.
About the custom group homepage template, this is only for theme developers. It’s not something we bundle.
For more info, read the “Single Groups Front Page” section of this codex article:
@r-a-y thanks i did read that and i added a front.php in my theme under buddypress/groups/single and it worked perfectly fine. I was then looking to have a different page for pubblic groups vs private groups so i created a new file called
front-status-public.php and placed it under the same location of buddypress/groups/single
That is not working. Only front.php works.. as given in the hierarchy it should look at the status file before it even picks up the front.php. As shown below the home.php seems to be looking only for front.php and not the hierarchy. Any idea what is going on?
home.php code
if ( bp_is_group_home() ) : // Use custom front if one exists $custom_front = locate_template( array( 'groups/single/front.php' ) ); if ( ! empty( $custom_front ) ) : load_template( $custom_front, true ); // Default to activity elseif ( bp_is_active( 'activity' ) ) : locate_template( array( 'groups/single/activity.php' ), true ); // Otherwise show members elseif ( bp_is_active( 'members' ) ) : locate_template( array( 'groups/single/members.php' ), true ); endif;
Since you modified the home.php template, you have to make some adjustments so the new changes will work.
Read the bpdevel post on this:
Get Ready! 2.4.0 will introduce important changes in Groups homesEspecially the last section –
Changes in 2 templates
.@r-a-y i did not any changes to home.php the code that i sent you was directly from the plugin buddypress2.4.0 folders.
You might have to do a fresh install because BuddyPress 2.4.0 uses new code for the
/groups/single/home.php
template:
https://buddypress.trac.wordpress.org/browser/tags/2.4.0/src/bp-templates/bp-legacy/buddypress/groups/single/home.php#L75The code you listed above is older code.
If you already have those changes, then I’m guessing you are using a custom theme with BuddyPress support that has overriden the
groups/single/home.php
template. If that is the case, you’ll have to change the group home template to use these new lines.@r-a-y hmmm i am not even checking it in my theme i just unzipped buddypress.2.4.0 and i am seeing the old file inside that.
@r-a-y i got it.. in buddypress 4.0 under buddypress.2.4.0\buddypress\bp-templates\bp-legacy\buddypress\groups\single the new file is there but under
buddypress.2.4.0\buddypress\bp-themes\bp-default\groups\single
it has the older file. Is that how its supposed to be? I am now going to check my theme to see if it has overridden any of those files.
Thanks,
ParagWe have deprecated support for the bp-default theme since v1.9:
The future of the bp-default themeThat being said, we can look into supporting this feature in bp-default for BP v2.5.0.
Thanks@r-a-y i figured out that my Theme has code from older version of buddy press. I will go ahead and modify it.
- The topic ‘BP 2.4.0 – Group frontpage hierarchy question’ is closed to new replies.