after using locate_template() to load template with child theme i get error

Warning: Cannot modify header information - headers already sent by (output started at /xxxx/wp-content/themes/bp-default/header.php:3) in /xxxx/wp-includes/pluggable.php on line 868

here a solution:

------------- edit code --------------------
edit the file wp-includes/pluggable.php
in line 863 replace:

if ( $is_IIS ) {
header("Refresh: 0;url=$location");
} else {
if ( php_sapi_name() != 'cgi-fcgi' )
status_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);
}

with this:
if( !headers_sent() ).
{
if ( $is_IIS ) {
header("Refresh: 0;url=$location");
} else {
if ( php_sapi_name() != 'cgi-fcgi' )
tatus_header($status); // This causes problems on IIS and some FastCGI setups
header("Location: $location", true, $status);
}
--------------------------------------------

not a best solution but it get rid of that error

4 comments

  1. jpisano@jpisano.com // 29 พฤษภาคม 2553 เวลา 16:42  

    Trying to contact you about BuddyPress Badge.
    Not working in new BP Setup. No Picture.

  2. warut // 31 พฤษภาคม 2553 เวลา 10:06  

    i will check it

  3. jpisano@jpisano.com // 31 พฤษภาคม 2553 เวลา 19:11  

    You can contact me via @pisanojm on Twitter. The currenst site is http://musicpln.org it is not active yet for users, but I can get you in to look at this. The two things holding me back at this point from going live are an issue with tweetstream and getting the badge working.

  4. jpisano@jpisano.com // 1 มิถุนายน 2553 เวลา 10:11  

    Warut,

    I made two screenshots so you can see what is going on here:

    http://mustech.net/miscpicts/badge1.png
    http://mustech.net/miscpicts/badge2.png

    Hopefully, this will help some.

แสดงความคิดเห็น