Skip to content

Commit

Permalink
Move template parts to template-parts folder
Browse files Browse the repository at this point in the history
Both content.php and content-none.php are template parts and therefore it is more logical to place them in template-parts folder.

(Underscores does this too, but not default themes like TwentyTwelve.)
  • Loading branch information
Aetles committed Feb 5, 2016
1 parent 5361643 commit bdab6e8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
<?php endwhile; ?>

<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; // End have_posts() check. ?>

Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
<?php endwhile; ?>

<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif; // End have_posts() check. ?>

Expand Down
4 changes: 2 additions & 2 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<?php if ( have_posts() ) : ?>

<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
<?php endwhile; ?>

<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>

<?php endif;?>

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit bdab6e8

Please sign in to comment.