Skip to content

Commit

Permalink
Smarter template selection for posts vs. pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellr committed Apr 30, 2018
1 parent cde2820 commit 8216e6a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
10 changes: 7 additions & 3 deletions page-templates/color-gray.php
Expand Up @@ -6,6 +6,10 @@
* @package Music Theme
*/

// This template is all handled by CSS, so we're
// just replicating the single.php template here.
get_template_part( 'single' );
// This template is all handled by CSS, so we're just
// replicating the single.php or page.php templates here.
if ( is_single() ) {
get_template_part( 'single' );
} else if ( is_page() ) {
get_template_part( 'page' );
}
10 changes: 7 additions & 3 deletions page-templates/color-pink.php
Expand Up @@ -6,6 +6,10 @@
* @package Music Theme
*/

// This template is all handled by CSS, so we're
// just replicating the single.php template here.
get_template_part( 'single' );
// This template is all handled by CSS, so we're just
// replicating the single.php or page.php templates here.
if ( is_single() ) {
get_template_part( 'single' );
} else if ( is_page() ) {
get_template_part( 'page' );
}
10 changes: 7 additions & 3 deletions page-templates/color-white.php
Expand Up @@ -6,6 +6,10 @@
* @package Music Theme
*/

// This template is all handled by CSS, so we're
// just replicating the single.php template here.
get_template_part( 'single' );
// This template is all handled by CSS, so we're just
// replicating the single.php or page.php templates here.
if ( is_single() ) {
get_template_part( 'single' );
} else if ( is_page() ) {
get_template_part( 'page' );
}
10 changes: 7 additions & 3 deletions page-templates/hide-header.php
Expand Up @@ -6,6 +6,10 @@
* @package Music Theme
*/

// This template is all handled by CSS, so we're
// just replicating the single.php template here.
get_template_part( 'single' );
// This template is all handled by CSS, so we're just
// replicating the single.php or page.php templates here.
if ( is_single() ) {
get_template_part( 'single' );
} else if ( is_page() ) {
get_template_part( 'page' );
}

0 comments on commit 8216e6a

Please sign in to comment.