Skip to content

Instantly share code, notes, and snippets.

@adampatterson
Created March 27, 2014 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adampatterson/9798120 to your computer and use it in GitHub Desktop.
Save adampatterson/9798120 to your computer and use it in GitHub Desktop.
<?
if ( have_posts() ):
echo '<!-- '.$post->post_name.'-->';
if ( is_front_page() ):
get_template_part('templates/content', 'home');
else:
if ( file_exists(get_template_directory().'/templates/content-'.$post->post_name.'.php'))
get_template_part('templates/content', $post->post_name);
else
get_template_part('templates/content', 'page');
endif;
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment