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 trialMegan Frankosky
1,060 PointsCreating new page redirects to blank site (rather than back to wp-admin
Hello,
I am developing locally and I can create new pages through wp-admin, but when I do I am redirected to a blank page, rather than back to the wp-admin site. Thoughts on why this might be happening?
here is what I am doing:
- in wp-admin nav to "Pages"
- "Add New"
- give title, "Publish"
- redirected to a blank page (http://localhost:8888/bootstrap-to-wp/wp-admin/post.php) rather than back to the wp-admin site
The new page is created when I navigate back, so the action is working, but the redirect is not working correctly.
4 Answers
Stanley Thijssen
22,831 Pointshave you tryed to turn on debugging mode? This way you can see what error you get when clicking on publish.
To turn on debugging mode, go to your main WordPress folder. Open the wp-config.php file and check if the file has a WP_DEBUG mode code inside it. If it does change the value from false to true. If it doesnt has WP_DEBUG inside it then add the following code:
define( 'WP_DEBUG', true );
Gerjan de Vries
5,625 PointsSame problem. But thanks Stanley! The solution for me was: Removing the white space after the closing "?>" in functions.php.
Maximilian Ast
206 PointsHad the same problem thanks Gerjan! Would have never thought of deleting the white space after the closing php tag.
Andrew Dovganyuk
10,633 PointsSame with me! It fix the problem!
Justin Oakerson
1,758 PointsIt's true, this additional code breaks the program. Unfortunately, all this code seems very arbitrary ... and a bit of a wordpress theme development hack.