Skip to:
Content
Pages
Categories
Search
Top
Bottom

using bp-custom.php causing conflicts

  • @jerrysc

    Participant

    I am using wordpress multisite 3.8.1 and buddypress 1.9. I am trying to customize my site, so I’ve created a bp-custom.php file. I’ve been reading the codex pages and I am now at an impasse.

    When I first implemented the bp-custom.php it caused severe conflicts with BotDetect CAPTCHA, so I removed that plugin. That allowed bp-custom to work properly, but is causing a conflict with users logging in or logging out. I tried remove AJAX login, but that did not help.

    Specifically, I get these two lines, the 2nd one with multiple occurrences:

    Warning: Cannot modify header information – headers already sent by (output started at /mysite/wp-content/plugins/bp-custom.php:2) in /mysite/htdocs/GotBooks_WordPress/wp-login.php on line 415

    Warning: Cannot modify header information – headers already sent by (output started at mysite/wp-content/plugins/bp-custom.php:2) in /mysite/htdocs/GotBooks_WordPress/wp-includes/pluggable.php on line 695

    My bp-custom file is located in the wordpress plugins folder. Here is my code in bp-custom:

    <?php

    // making my own functions to customize buddypress
    // by Jerry

    function bbg_change_profile_tab_order() {
    global $bp;

    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘activity’][‘position’] = 20;
    $bp->bp_nav[‘blogs’][‘position’] = 30;
    $bp->bp_nav[‘friends’][‘position’] = 40;
    $bp->bp_nav[‘messages’][‘position’] = 50;
    $bp->bp_nav[‘groups’][‘position’] = 80;
    $bp->bp_nav[‘settings’][‘position’] = 60;
    }
    add_action(‘bp_setup_nav’, ‘bbg_change_profile_tab_order’, 999 );
    ?>

    I am on shared hosting with 1and1.com – don’t know if that makes a difference. I’ve been searching threads but can’t find a similar issue. Any help would be appreciated!

    Thanks,

Viewing 2 replies - 1 through 2 (of 2 total)
  • @aces

    Participant

    @jerrysc

    It’s not clear from your code as you don’t use the code tag….

    The error messages suggest that the problem is on line two of your bp-custom.php file.

    Is that all that’s in your file and if so, then is <?php the first thing in the file? There should not be any other characters, blank spaces or lines before it. Similarly there should be nothing after the final ?>.

    Also make sure that your 'single quote marks' aren’t turned in to smart quotes when you copy and paste ( this can also happen with double quotes – " " turning to “ ” ). Also this needs to be done using a text/code editor such as Notepad++ not a wordprocessor such as MS Word.

    Have you tried the recent variation of the above mentioned by buddypress lead developer jjj in https://buddypress.org/support/topic/profile-sorry/#post-178320

    @jerrysc

    Participant

    @aces

    Thanks!!!!

    It was my inexperience in php coding (a huge understatement). The problem was spaces before the <?php line, and spaces after the final ?>.

    Next time I will use the code tag – still new to this.

    Thanks again – very much appreciated. I suppose we can close this as solved. I would do that but do not know how, or if I am even able to.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘using bp-custom.php causing conflicts’ is closed to new replies.
Skip to toolbar