Make WordPress Themes

source: skt-coach/1.5/front-page.php

Last change on this file was 195240, checked in by themedropbox, 2 years ago

New theme: SKT Coach - 1.0

File size: 3.3 KB
Line 
1<?php
2/**
3 * The template for displaying home page.
4 *
5 * This is the template that displays all pages by default.
6 * Please note that this is the WordPress construct of pages
7 * and that other 'pages' on your WordPress site will use a
8 * different template.
9 *
10 * @package SKT Coach
11 */
12get_header(); 
13
14?>
15<div class="container">
16<div id="content_navigator">
17     <div class="page_content">
18      <?php 
19        if ( 'posts' == get_option( 'show_on_front' ) ) {
20    ?>
21    <section class="site-main">
22      <div class="blog-post">
23        <?php
24                    if ( have_posts() ) :
25                        // Start the Loop.
26                        while ( have_posts() ) : the_post();
27                            /*
28                             * Include the post format-specific template for the content. If you want to
29                             * use this in a child theme, then include a file called called content-___.php
30                             * (where ___ is the post format) and that will be used instead.
31                             */
32                            get_template_part( 'content', get_post_format() );
33                        endwhile;
34                        // Previous/next post navigation.
35                                                the_posts_pagination( array(
36                                                        'mid_size' => 2,
37                                                        'prev_text' => esc_html__( 'Back', 'skt-coach' ),
38                                                        'next_text' => esc_html__( 'Next', 'skt-coach' ),
39                                                ) );
40                    else :
41                        // If no content, include the "No posts found" template.
42                         get_template_part( 'no-results', 'index' );
43                    endif;
44                    ?>
45      </div>
46      <!-- blog-post -->
47    </section>
48    <?php
49} else {
50    ?>
51        <section class="site-main">
52      <div class="blog-post">
53        <?php
54                    if ( have_posts() ) :
55                        // Start the Loop.
56                        while ( have_posts() ) : the_post();
57                            /*
58                             * Include the post format-specific template for the content. If you want to
59                             * use this in a child theme, then include a file called called content-___.php
60                             * (where ___ is the post format) and that will be used instead.
61                             */
62                                                         ?>
63                             <header class="entry-header">           
64                                        <h1><?php the_title(); ?></h1>
65                                </header>
66                             <?php
67                            the_content();
68                        endwhile;
69                        // Previous/next post navigation.
70                                                the_posts_pagination( array(
71                                                        'mid_size' => 2,
72                                                        'prev_text' => esc_html__( 'Back', 'skt-coach' ),
73                                                        'next_text' => esc_html__( 'Next', 'skt-coach' ),
74                                                ) );
75                    else :
76                        // If no content, include the "No posts found" template.
77                         get_template_part( 'no-results', 'index' );
78                    endif;
79                    ?>
80      </div>
81      <!-- blog-post -->
82    </section>
83        <?php
84}
85        ?>
86    <?php get_sidebar();?>
87    <div class="clear"></div>
88  </div><!-- site-aligner -->
89  </div>
90</div><!-- content -->
91<?php get_footer(); ?>
Note: See TracBrowser for help on using the repository browser.