Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] How to edit BP without losing it all in an update?


  • insearchofasolution
    Participant

    @insearchofasolution

    Hi,

    I created my first child theme today! Yay πŸ˜€ But this is to edit my theme for the entire website (not only BP). Now, I want to make some layout & style changes in the BP area, but all I have found is to create a child theme for this. So I am not sure how to go about, as I already have activated my other child theme. I also will need to rename tabs, etc. wich means, I will need to edit other files too (not just the theme). But I don’t want to edit the core files, because of the updates…

    Anyone able to help? Thanks

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

  • insearchofasolution
    Participant

    @insearchofasolution

    Can anyone help on this please? I couldn’t find it anywhere πŸ™


    r-a-y
    Keymaster

    @r-a-y

    It depends on what you want to do.

    If you are talking about template overrides, then follow this guide:

    Theme Compatibility – Customizing

    If you are talking about code snippets, you can use your theme’s functions.php file or wp-content/plugins/bp-custom.php.


    insearchofasolution
    Participant

    @insearchofasolution

    Thanks @r-a-y. I need to do a little bit of both. I have tried to do it the way as in the article, unfortunately that doesn’t work for me. I do everything as described and tried it with and without placing add_theme_support( ‘buddypress’ ); in functions.php and nothing. I am using a child theme, can it have to do something with that?

    If you are talking about code snippets, you can use your theme’s functions.php file or wp-content/plugins/bp-custom.php.

    Thanks for the above!!


    danbp
    Participant

    @danbp

    Hi,

    by reading the first topic, it sounds like you try to use more than one child theme !

    I already have activated my other child theme

    If it is the case, it’s not the way to proceed. πŸ˜‰

    1) You should have only one child-theme activated.
    2) in this child, you add a folder called buddypress.
    3) if you need to modify some BP templates, you copy the original from wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/ into the child BP folder.

    Example of what you should have:
    wp-content/themes/XYZ theme
    wp-content/themes/XYZ-child/

    Let’s say you want to modify BP’s register page.
    wp-content/themes/XYZ-child/buddypress/members/register.php
    or you want to modify the profile header template
    wp-content/themes/XYZ-child/buddypress/members/single/member-header.php

    And that’s it ! The only thing you have to do is to pick the right file and add it to the child by respecting the original path who starts at: /buddypress/path/to/file.php

    Inside the template file, yo can manipulate html tags and find different action hooks ( do_action( 'something' ); ). Take care to not rename or remove the existing class/ID names whithout knowing what you do.

    In bp-custom.php, you can manipulate BP’s behave by adding custom functions.

    In the child-theme style.css, you manipulate whatever related to your theme layout – for the entire site, including BP or other plugins.

    And as all this is done via the child, anything will remain after any update of BuddyPress, your original theme, WordPress or plugins.

    Reading actively the forum will bring you other answers, tips and tricks.


    insearchofasolution
    Participant

    @insearchofasolution

    @danbp thanks for the above, that’s exactly what I have done. I have only one child theme and this is where the issue was. After 3 days of frustration and searching all over the internet, I have found the issue, which actually is a little stupid lol I guess after updating the main theme, it activated itself automatically? So the actual child theme was not active! So it’s all working now. Thanks for the help!


    danbp
    Participant

    @danbp

    Glad you got it ! We all learned a day from our mistakes… πŸ˜‰

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] How to edit BP without losing it all in an update?’ is closed to new replies.
Skip to toolbar