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 trialTory Watson
Courses Plus Student 2,980 Pointsindex.php Blank after Activating a Custom Theme
Followed the steps in the video: http://teamtreehouse.com/library/websites/how-to-build-a-wordpress-theme/wordpress-theme-templates/activating-a-custom-theme
When I went to the index.php file it is blank.
Saw a previous post about reinstalling Wordpress to fix this issue, but looking for a more efficient solution.
Could this be a caching issue. We've worked with Magento in the past and had similar experiences that were resolved by clearing the cache within the admin.
I'm developing locally on a Mac using MAMP.
Any assistance would be greatly appreciated.
Thank you,
-Tory
3 Answers
Ernest Grzybowski
Treehouse Project ReviewerI haven't taken the Wordpress courses on treehouse, but I have set up and made custom themes for over 10 websites. With that said, you are saying that your index.php is empty. In the video the index.php is set up as follows:
<?php get_header(); ?>
<p>This is the index.php file.</p>
<?php get_footer(); ?>
Again, I'm not sure how the course is taught, but you should be fine with just editing the index.php and saving it.
Tory Watson
Courses Plus Student 2,980 PointsThank you for the responses.
Both the index.php and front-page.php are blank when refreshing the browser even though the code on the page matches that which is in the tutorial video.
This post is about the same issue but I was trying to avoid a re-install of WP.
-Tory
Ernest Grzybowski
Treehouse Project ReviewerIf the index.php or front-page.php have:
<p>Anything written here</p>
It most definitely should show up. Are you sure that the theme is selected and activated? What ever the problem may be, I'm almost certain a "re-install" of WP will not have to be performed.
Tory Watson
Courses Plus Student 2,980 Pointswpportfolio theme is activated and files are exactly like in video.
I guess I'll try the re-install.
Thank y'all for the effort. :-)
Matt Campbell
9,767 PointsI don't know what text editor you're using, but make sure that you navigate to the page via your browser. WordPress is funny, it doesn't like you loading up a doc in your editor and then hitting the hotkey to open in browser.
Something to do with the WordPress engine...not sure on the details exactly but I'm guessing it gets started when you navigate via browser to a WordPress site.
Riley Hilliard
Courses Plus Student 17,771 PointsRiley Hilliard
Courses Plus Student 17,771 PointsAlso if he is following the tutorial mentioned, he may be dealing with the front-page.php file instead of index.php.
Ernest Grzybowski
Treehouse Project ReviewerErnest Grzybowski
Treehouse Project ReviewerYeah, the video shows both index.php and front-page.php.