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 From Bootstrap to WordPress Setup a Bootstrap Theme Creating Bootstrap Navigation in WordPress

Megan Frankosky
Megan Frankosky
1,060 Points

Creating 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:

  1. in wp-admin nav to "Pages"
  2. "Add New"
  3. give title, "Publish"
  4. 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
Stanley Thijssen
22,831 Points

have 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
Gerjan de Vries
5,625 Points

Same problem. But thanks Stanley! The solution for me was: Removing the white space after the closing "?>" in functions.php.

Had the same problem thanks Gerjan! Would have never thought of deleting the white space after the closing php tag.

Andrew Dovganyuk
Andrew Dovganyuk
10,633 Points

Same with me! It fix the problem!

It's true, this additional code breaks the program. Unfortunately, all this code seems very arbitrary ... and a bit of a wordpress theme development hack.