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 trialNyron Telemaque
1,987 PointsWordpress blog injection
This is the thing. I am building a site and I want just the most 3-5 recent post shown on the home page. The rest of the site was not built on the WP platform. How do I approach this
2 Answers
Andrew Rowberry
3,579 Pointsyou need to download wordpress onto your root directory then use a php include to the wp folder on your index.php thats outside the wp folder in your root dirrctory, next put the basic wordpress loop where you want the posts to be displayed.
Andrew Rowberry
3,579 Pointsinclude wp onto your index.php like this <?php require 'yourwpfolder/wp-blog-header.php' ?>
Nyron Telemaque
1,987 PointsThank you very much Andrew!
Andrew Shook
31,709 PointsAndrew Shook
31,709 PointsSo your home page is a static html page and not a part of wordpress?