"How to Build a WordPress Plugin" was retired on July 6, 2019.

Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Theme Development The WordPress Loop Adding the Loop to the index.php File

Kimberly Ludwikoski
Kimberly Ludwikoski
814 Points

Cannot log into my test site. I've been following along, while not logged in, so cannot see the dashboard.

When I enter URL http://localhost/wpsandbox/wp-admin/, I get the following errors:

( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\wpsandbox\wp-content\themes\birchportfolio\functions.php:38) in C:\wamp\www\wpsandbox\wp-includes\pluggable.php on line 1228 Call Stack

Time Memory Function Location

1 0.0005 271656 {main}( ) ..\index.php:0 2 0.0010 340576 require_once( 'C:\wamp\www\wpsandbox\wp-admin\admin.php' ) ..\index.php:10 3 0.2379 26877504 auth_redirect( ) ..\admin.php:84 4 0.2385 26878576 wp_redirect( ) ..\pluggable.php:1088 5 0.2386 26889352 header ( ) ..\pluggable.php:1228

Can anyone help me figure this out?

3 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

You'll need to log in to attempt to debug anything, but if you clear out your functions.php file that should remove those errors for the time being. Then you can follow the videos again while logged into your admin area to see if you can find out what's causing the problem. :-)

Kimberly Ludwikoski
Kimberly Ludwikoski
814 Points

Thanks, Jonathon. I cleared out my functions.php file, completely, and still got the same error messages. Then I deleted the functions.php file, and still get the same error messages. I'm not sure what else to try.

Gianmarco Mazzoran
Gianmarco Mazzoran
22,076 Points

Hi Kimberly Ludwikoski, try to follow one of the solution in this page. Generally, the problem is the closing php tag at the end of the functions.php file or some whitespace in your file.