Skip to:
Content
Pages
Categories
Search
Top
Bottom

Copy buddypress files into child theme


  • pradeepphule
    Participant

    @pradeepphule

    Hi there,

    I want to copy buddypress files into child theme. I have copied exact path the the plugin folder have. Still it takes data from plugin folder.

    Any suggestion?

    Thanks,
    Pradeep

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

  • Venutius
    Moderator

    @venutius

    so the directory structure should look like this:

    themes/your-child-theme/buddypress/members/file.php etc. can you confirm this is what you have got?

    Would you have a plugin or theme that is redirecting the buddypress default template search?


    pradeepphule
    Participant

    @pradeepphule

    Hey @venutius,

    Thank you so much.

    Got it your point.

    Once again thanks.


    Brajesh Singh
    Participant

    @sbrajesh

    Do you want to override template files? If yes, the first step is to find out which template pack you are using(Dashboard->settings->BuddyPress->Options).

    BuddyPress comes with 2 template packs
    – BP Legacy
    – BP Nouveau

    Once you know the template pack, you can follow the following step

    1. create a directory named “buddypress” in your theme
    2. Now visit wp-content/plugins/buddypress/bp-templates, you will see two directories
    – bp-legacy
    – bp-nouveau
    3. Based on your current template pack, visit that directory. You will find “buddypress” directory inside them. This is the directory of your interest. Copy files from there and maintain the path.

    For example, if bp-legacy is your current template pack and you want to modify members loop,

    you should copy wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.php to yourtheme/buddypress/members/members-loop.php

    Note the path after the template pack is what we need to maintain. Once you override it, BuddyPress will use it form your theme.

    Please do note that themes do not allow you to specify template pack while overriding template files, so if you override it for one template pack and then activate another, It can lead to a lot of issues.

    My suggestion is to remove/rename the “buddypress” directory in your theme if you change the current template pack for BuddyPress.

    Hope this helps.

    Best Regards
    Brajesh


    Brajesh Singh
    Participant

    @sbrajesh

    Oops, did not see that @venutius already replied .


    pradeepphule
    Participant

    @pradeepphule

    Hey @sbrajesh,

    Thanks for the solution you provided.

    Your solution is in brief and easy to understand.

    Once again thanks.


    Brajesh Singh
    Participant

    @sbrajesh

    You are welcome 🙂


    pradeepphule
    Participant

    @pradeepphule

    Hello @sbrajesh,

    I’m trying to copy bp-friends-template.php file into child theme. I have tried many times still not able to understand how to set the correct path in child theme.

    Plugin file path: buddypress\bp-friends\bp-friends-template.php

    Any suggestion.

    Thanks


    Venutius
    Moderator

    @venutius

    Hi there,

    That’s not a file you can overload, you can only overload files in the buddypress/bp-templates/bp-nouveau(bp-legacy)/buddypress directory.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar