Skip to:
Content
Pages
Categories
Search
Top
Bottom

About BuddyPress Templates


  • Joshua Blevins
    Participant

    @jblevins1991

    I see in bp-legacy there are many files (including: group-header.php, home.phpm admin.php, cover-image-header.php, activity.php, members.php,etc.). Is there anybody within the community that can explain how WordPress and BuddyPress put together the group profile pages and what files they use.

    Example: WordPress uses get_header to fetch header.php and get_footer to fetch footer.php. However, I don’t really see any file that has functions to get the group-header and the other components. Did I just not look at the right files, or does BuddyPress look for these files for me and put them together?

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

  • Joshua Blevins
    Participant

    @jblevins1991

    Anybody know how BuddyPress looks for and puts together the group profile page?


    Henry Wright
    Moderator

    @henrywright

    BuddyPress starts with the index.php template and makes use of bp_get_template_part() to load the “partials” such as members-loop.php. See here for an example.


    Joshua Blevins
    Participant

    @jblevins1991

    Okay because I was looking at bp-core-template-loader. I saw the many functions such as bp_register_template_stack and bp_get_template_stack. From the description of the function in the comments I infer these functions allow me to say “instead of bp-legacy use these folders instead”. Is there a way to get BuddyPress to use the files at my-theme/buddypress/groups instead?

    Also is index.php the page that shows lists of groups or the groups profile page?


    Henry Wright
    Moderator

    @henrywright

    Also is index.php the page that shows lists of groups or the groups profile page?

    There are different index.php templates. Here is another one for example. If you start from here you should be able to browse through all of the templates available.


    Joshua Blevins
    Participant

    @jblevins1991

    Right, when it says directory it means that its where all of the groups are shown in a list right?

    I am trying to find which pages are what right now so I can mirror the directory structure and move on to coding them out and testing things on them.

    Can you give me some more information on which ones are which? I really couldn’t find which one would be the profile page where you can view that groups activities and members, etc.

    @jblevins1991 Please check through the BP codex documentation we provide a few guides there that set out how BP templating is structured and how to overload the files to a theme or child theme, this is your first port of call for information thereafter if you still have questions not covered in our guides do ask back here.


    Joshua Blevins
    Participant

    @jblevins1991

    Okay. Revisiting that page kind of game me some direction. I think I just stumbled into a state of pure confusion. I’ll post back if I have any questions.


    Joshua Blevins
    Participant

    @jblevins1991

    I really should not have posted before testing. However I copied pasted the BuddyPress Template for index.php to my theme and It comes up as a blank page. Any ideas why this would happen?

    Explain in detail! Exactly what file, copied from where to where and in what directory structure is it housed in the new theme location – there is no one index.php for BP and all files, if we’re talking theme compatibility, are NOT standalone template files despite the implication in naming i.e ‘index.php’ but are themselves just partials that get injected into the WP template API via the title & content tags, check the BP template hierarchy guides.


    Joshua Blevins
    Participant

    @jblevins1991

    I copied the files that are located in bp-legacy/buddypress/groups to MyTheme/buddypress/groups. Hmmmm, I will have to look into that Hugo. So that would be why you never see get_header or get_footer, etc. in any buddypress templates. That makes a hell of a lot more sense!


    Joshua Blevins
    Participant

    @jblevins1991

    Just gonna bump this up.

    For why?
    What’s the issue you’re having?

    You should have control of your templates now and can modify as you need; the master WP template that would be used is generally page.php copy that to /buddypress/ and rename to buddypress.php to have control of this top level template.


    Joshua Blevins
    Participant

    @jblevins1991

    Do you have a fully custom BuddyPress theme that is not a child theme? I’d really like to look at the code and figure it out under the hood.


    peter-hamilton
    Participant

    @peter-hamilton

    lol…. you need to copy the folder “buddypress” to your root folder.

    Find “buddypress” folder here.

    plugins/buddypress/bp-templates/bp-legacy/buddypress

    Now you need to read up on how to change these template files for your need, only these files inside this folder should be changed.

    There is no buddypress theme, all wordpress themes are buddypress themes, and the only way to make something unique is through making a child theme of a wordpress site first, then adding buddypress css code and templates etc.

    Good luck mate, here is a sample of what I am doing with buddypress…
    My Buddypress site | Onlijn.com


    Joshua Blevins
    Participant

    @jblevins1991

    Got it to work. Thank you for your help Hugo.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘About BuddyPress Templates’ is closed to new replies.
Skip to toolbar