Twenty Fourteen: allow any page to be set as the front page, removing requirement for front-page.php
template file. Props iamtakashi, fixes #25685.
git-svn-id: https://develop.svn.wordpress.org/trunk@25985 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6b711ca35e
commit
e575c315fb
@ -9,6 +9,7 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
<div id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -24,8 +25,9 @@ get_header(); ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
<section id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -59,8 +60,9 @@ get_header(); ?>
|
||||
?>
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
<section id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -43,8 +44,9 @@ get_header(); ?>
|
||||
?>
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
@ -9,6 +9,13 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
|
||||
<?php
|
||||
if ( is_front_page() && twentyfourteen_has_featured_posts() )
|
||||
get_template_part( 'featured-content' );
|
||||
?>
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
<?php
|
||||
@ -34,6 +41,7 @@ get_header(); ?>
|
||||
?>
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
|
@ -1,46 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the home page
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Fourteen
|
||||
* @since Twenty Fourteen 1.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div class="front-page-content-wrapper">
|
||||
|
||||
<?php
|
||||
if ( twentyfourteen_has_featured_posts() )
|
||||
get_template_part( 'featured-content' );
|
||||
?>
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
<?php
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
|
||||
get_template_part( 'content', get_post_format() );
|
||||
|
||||
comments_template();
|
||||
endwhile;
|
||||
twentyfourteen_paging_nav();
|
||||
|
||||
else :
|
||||
get_template_part( 'content', 'none' );
|
||||
|
||||
endif;
|
||||
?>
|
||||
</div><!-- #content .site-content -->
|
||||
</div><!-- #primary .content-area -->
|
||||
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
|
||||
</div><!-- .front-page-content-wrapper -->
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
@ -9,6 +9,13 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
|
||||
<?php
|
||||
if ( is_front_page() && twentyfourteen_has_featured_posts() )
|
||||
get_template_part( 'featured-content' );
|
||||
?>
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
<?php
|
||||
@ -24,6 +31,7 @@ get_header(); ?>
|
||||
?>
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
|
@ -12,6 +12,7 @@ $metadata = wp_get_attachment_metadata();
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
<section id="primary" class="content-area image-attachment">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -84,6 +85,7 @@ get_header();
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
|
@ -15,6 +15,13 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
|
||||
<?php
|
||||
if ( is_front_page() && twentyfourteen_has_featured_posts() )
|
||||
get_template_part( 'featured-content' );
|
||||
?>
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -35,8 +42,9 @@ get_header(); ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
@ -13,6 +13,12 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
|
||||
<?php
|
||||
if ( is_front_page() && twentyfourteen_has_featured_posts() )
|
||||
get_template_part( 'featured-content' );
|
||||
?>
|
||||
<div id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -30,8 +36,9 @@ get_header(); ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
<section id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -34,8 +35,10 @@ get_header(); ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
<div id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
<?php
|
||||
@ -26,8 +27,9 @@ get_header(); ?>
|
||||
?>
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
@ -13,7 +13,6 @@ This theme, like WordPress, is licensed under the GPL.
|
||||
Use it to make something cool, have fun, and share what you've learned with others.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Table of Contents:
|
||||
*
|
||||
@ -34,9 +33,8 @@ Use it to make something cool, have fun, and share what you've learned with othe
|
||||
* 6.8 - Archives
|
||||
* 6.9 - Contributor Page
|
||||
* 6.10 - 404 Page
|
||||
* 6.11 - Front Page
|
||||
* 6.12 - Full-width
|
||||
* 6.13 - Comments
|
||||
* 6.11 - Full-width
|
||||
* 6.12 - Comments
|
||||
* 7.0 - Sidebar
|
||||
* 7.1 - Widgets
|
||||
* 7.2 - Content Sidebar Widgets
|
||||
@ -770,6 +768,10 @@ span + .edit-link:before,
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 4.0 Header
|
||||
@ -1721,17 +1723,7 @@ a.post-thumbnail:hover {
|
||||
|
||||
|
||||
/**
|
||||
* 6.11 Front Page
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
.front-page-content-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 6.12 Full-width
|
||||
* 6.11 Full-width
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@ -1754,7 +1746,7 @@ a.post-thumbnail:hover {
|
||||
|
||||
|
||||
/**
|
||||
* 6.13 Comments
|
||||
* 6.12 Comments
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@ -3243,6 +3235,10 @@ a.post-thumbnail:hover {
|
||||
padding-left: 182px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.site-content {
|
||||
margin: 0 29.04761904% 0 182px;
|
||||
}
|
||||
@ -3377,10 +3373,6 @@ a.post-thumbnail:hover {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.front-page-content-wrapper {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.featured-content {
|
||||
padding-left: 182px;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
<section id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -45,8 +46,9 @@ get_header(); ?>
|
||||
?>
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
<?php get_sidebar( 'content' ); ?>
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div id="main-content" class="main-content">
|
||||
<section id="primary" class="content-area">
|
||||
<div id="content" class="site-content" role="main">
|
||||
|
||||
@ -64,8 +65,8 @@ get_header(); ?>
|
||||
?>
|
||||
</div><!-- #content -->
|
||||
</section><!-- #primary -->
|
||||
</div><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_sidebar( 'content' );
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
Loading…
Reference in New Issue
Block a user