Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Andrew Pfund
6,965 Pointsstore navigation in get template part file?
Is it considered best practice to store all the navigation writeup in a 'get template part' file so the header is cleaner?
and then just place it in the header file with ...get_template_part( content, navigation )...
Or does doing that on every page a few times slow down the page load time slightly?
3 Answers

Anthony Moore
2,282 PointsYou should be using "wp_nav_menu()" to display your navigation. That would be the best practice.

Andrew Pfund
6,965 PointsI don't think you understood the question, wp_nav_menu() and any associated code with the nav would be placed in a template file, so that the header file is less cluttered, does that slow down the page at all?

Anthony Moore
2,282 PointsNo, that should not have any affect really on page speed.