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 trialnemanjasreckovic
8,784 Pointsone page templates
How to build it? I started with front-page.php where I planned to do everything, but I have problem to load "page" content (several pages ofc) I managed to load in posts with several loops but not pages.
4 Answers
Matt Campbell
9,767 PointsYou don't use pages, it's all done with posts. You only have 1 page at the end of the day.
You could if you wanted to query the page post type but that's going to get messy and isn't necessary.
Matt Campbell
9,767 PointsClick Screen Options on the menu page and you'll see the option for posts. :)
nemanjasreckovic
8,784 PointsI will check it out, I didn't noticed this
Zac Gordon
Treehouse Guest TeacherOne possible option here is to create "Pages" in the admin area and use a number of custom queries in the front-page.php file to include the different "Pages" where you want them on the single site. The for each section apply a unique ID and in your menu have the links link to #uniqueid instead of actual pages.
nemanjasreckovic
8,784 PointsI tried to load single page content and I didn't manage, is this only possible by using page ID or ? Can you show us how to load several pages into front-page.php file ?
For menu I used plug in "Page scroll to id" http://manos.malihu.gr/page-scroll-to-id which is doing more or less the same.
Thanks for your reply!
nemanjasreckovic
8,784 Points@Matthew Yes, it made a mess, everything stopped working, but if I have only post I can not have menu, ...