author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 5 | 5e2f62d02dcd |
permissions | -rw-r--r-- |
5 | 1 |
<?php |
2 |
/** |
|
3 |
* The main template file |
|
4 |
* |
|
5 |
* This is the most generic template file in a WordPress theme and one |
|
6 |
* of the two required files for a theme (the other being style.css). |
|
7 |
* It is used to display a page when nothing more specific matches a query, |
|
8 |
* e.g., it puts together the home page when no home.php file exists. |
|
9 |
* |
|
10 |
* @link https://codex.wordpress.org/Template_Hierarchy |
|
11 |
* |
|
12 |
* @package WordPress |
|
13 |
* @subpackage Twenty_Fourteen |
|
14 |
* @since Twenty Fourteen 1.0 |
|
15 |
*/ |
|
16 |
||
17 |
get_header(); ?> |
|
18 |
||
19 |
<div id="main-content" class="main-content"> |
|
20 |
||
21 |
<?php |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
22 |
if ( is_front_page() && twentyfourteen_has_featured_posts() ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
23 |
// Include the featured content template. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
24 |
get_template_part( 'featured-content' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
25 |
} |
5 | 26 |
?> |
27 |
||
28 |
<div id="primary" class="content-area"> |
|
29 |
<div id="content" class="site-content" role="main"> |
|
30 |
||
31 |
<?php |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
32 |
if ( have_posts() ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
33 |
// Start the Loop. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
34 |
while ( have_posts() ) : |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
35 |
the_post(); |
5 | 36 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
37 |
/* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
38 |
* Include the post format-specific template for the content. If you want to |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
39 |
* use this in a child theme, then include a file called content-___.php |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
40 |
* (where ___ is the post format) and that will be used instead. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
41 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
42 |
get_template_part( 'content', get_post_format() ); |
5 | 43 |
|
44 |
endwhile; |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
45 |
// Previous/next post navigation. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
46 |
twentyfourteen_paging_nav(); |
5 | 47 |
|
48 |
else : |
|
49 |
// If no content, include the "No posts found" template. |
|
50 |
get_template_part( 'content', 'none' ); |
|
51 |
||
52 |
endif; |
|
53 |
?> |
|
54 |
||
55 |
</div><!-- #content --> |
|
56 |
</div><!-- #primary --> |
|
57 |
<?php get_sidebar( 'content' ); ?> |
|
58 |
</div><!-- #main-content --> |
|
59 |
||
60 |
<?php |
|
61 |
get_sidebar(); |
|
62 |
get_footer(); |