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 Create the Basic WordPress Theme Files

patrick kellogg
patrick kellogg
7,579 Points

after copying the source from jumbotron into my theme's index.php file, I get a blank screen when i view my site.

any ideas?

patrick kellogg
patrick kellogg
7,579 Points

i use phpstorm and functions.php being this caused the problem: <?php

patrick kellogg
patrick kellogg
7,579 Points

twentyfifteen's functions.php file does not explicitly close out php with a ?> at the bottom of the file. So, 2015 is abiding by best practices. But in our bare bones example here it is required. this exposes a subtle bug in wordpress. LOL.

7 Answers

Sue Dough
Sue Dough
35,800 Points

Paste your code otherwise its near impossible to help you. My guess is you didn't include get_header and get_footer.

patrick kellogg
patrick kellogg
7,579 Points

maybe i wasn't clear - i figured it out - this is what breaks it :

in functions.php if you just have this in the file with nothing else such as code or a closing php tag: ?> at the end of the file it breaks and produces no output

<?php

// without this at the end of the file: ?> it breaks and produces no output

patrick kellogg
patrick kellogg
7,579 Points

with ide's, such as phpstorm when you create a new php file it create this for you:

<?php

// with no ?> closing tag because having a closing tag when not needed is bad practice // this breaks it and produces no output // a ?> closing tag is needed // with the functions.php file in a theme that is more than a barebones the closing ?> is never there // such as in twentyfifteen

a subtle bug in wordpress

patrick kellogg
patrick kellogg
7,579 Points

i hope you understand, if not, let me know an i will send u the code. then u will be enlightened a bit. thanks

patrick kellogg
patrick kellogg
7,579 Points

code typed in here gets truncated and screwed up - this form doesn't handle code very gracefully

Sue Dough
Sue Dough
35,800 Points

Code works perfect man. You just didn't use the markdown for it properly. Do 3 ticks around the code ``` on the opening and closing.

patrick kellogg
patrick kellogg
7,579 Points

this problem occurred before i got to the part of chopping up index.php into headers and footers the index.php can be as simple as this:

<!DOCTYPE html> <html lang="eng"> <head> <meta charset="utf-8"> <title></title> </head> <body> <h1>test</h1> </body> </html>

patrick kellogg
patrick kellogg
7,579 Points

it sounds weird but it is. it is a subtle bug. thanks though