WordPress get_template_part()

06.11.2011

I used this to create a static front page that is different from the other pages for a WordPress theme. Works kind of like a PHP include.

 

<?php get_header(); ?>

<?php if (is_front_page()): ?>

<?php get_template_part(‘frontpage’); ?>

<?php else : ?>

 

[usual page loop here]

 

<?php endif; ?>

<?php get_footer(); ?>