Skip to:

Settings template

  • 4colourprogress


    How comes the template functionality doesn’t work in bp in regards to the members settings options?

    Currently it goes;

    Home.php (contains all major page layout code)
    Settings.php (contains the subnav and if statement to load template based on what page you’re on)
    General.php (for some reason contains all the layout code again?)


    * BuddyPress Member Settings
    * @package BuddyPress
    * @subpackage bp-default

    get_header( ‘buddypress’ ); ?>

    <form action="” method=”post” class=”standard-form” id=”settings-form”>

     <a href=" ‘lostpassword’ ), ‘wp-login.php’ ), ‘login’ ); ?>” title=””>

    <input type="text" name="email" id="email" value="” class=”settings-input” />



    <input type="submit" name="submit" value="” id=”submit” class=”auto” />


    How comes it’s done like this when all the other pages work on a functioning template system?

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

  • drrxa


    I have the same question. Does WP checks if a template file loading already has a `get_header` and `get_footer`? and if so will ignore the header and footer loaded from the parent file? it is really confusing.

    drrxa: no, if you call those functions twice, the content will be duplicated.



    Thanks for reply Paul. And yes, WP won’t check for that and if called twice there will be double headers and footers.

    What I have found that these settings files (located in `bp-themes/bp-default/members/single/settings/`) are not loaded by the file `members/single/settings.php` and that is maybe why they override the original layout (they have for example their own `get_header, get_footer`, and `get_sidebar`). I found that by commenting the block of code responsible for loading these files in `settings.php` file which is:
    if ( bp_is_current_action( ‘notifications’ ) ) :
    locate_template( array( ‘members/single/settings/notifications.php’ ), true );

    elseif ( bp_is_current_action( ‘delete-account’ ) ) :
    locate_template( array( ‘members/single/settings/delete-account.php’ ), true );

    elseif ( bp_is_current_action( ‘general’ ) ) :
    locate_template( array( ‘members/single/settings/general.php’ ), true );

    else :
    locate_template( array( ‘members/single/plugins.php’ ), true );


    And the file still loading correctly, while doing the same thing in `members/single/profile.php` will break the theme loading.

    I dont have specific need for that, but I am just curious about where these files are loaded from and why they dont follow the same procedure? I have made a custom header for logged-in users `get_heade(‘loggedin’)` and rather than only modifying the `home.php` file header only, I had to modify the header of these four settings files as well `capabilities.php, delete-account.php, general.php, notifications.php`.



    drrxa – Unfortunately, this is a bug:



    Thanks r-a-y, I understand now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Settings template’ is closed to new replies.
Skip to toolbar