June 19, 2014

WordPress get_template_part() – Theme Development Tutorial

In this lesson we learn how to use the “get_template_part()” function to avoid repeating nearly identical code throughout our various theme files.

For example, posts are displayed very similarly on the blog homepage, the archives, and search results views, and “get_template_part()” is an excellent way to reuse a single chunk of code.

Link to download .zip of theme files as shown in this video (note: this is not a “complete” WordPress theme yet and this download is only intended for educational purposes to dissect and review).

Do you want to share the WordPress website that you’ve been creating on your computer with the world? The next step is to use a web host to share your site with the world. Learn about web hosts, my favorite one, and how to get a plan for only $5.78 per month.

View the entire “Learn WordPress” series

About the Author

Brad Schiff

Brad Schiff is a front-end developer, designer, and educator who has been building user interfaces for over a decade. He’s done work for Fortune 500 companies, national political campaigns, and international technology leaders. His proudest achievement is helping people learn front-end web development.

Follow Brad on Twitter Subscribe on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *