Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Settings template

@drrxa

Participant

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:
`
<?php
/*
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 );

endif;
*/
?>
`

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`.

Skip to toolbar