-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
892fab5
commit fb7261c
Showing
3 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* The main template file. | ||
* | ||
* This is the most generic template file in a WordPress theme | ||
* and one of the two required files for a theme (the other being style.css). | ||
* It is used to display a page when nothing more specific matches a query. | ||
* E.g., it puts together the home page when no home.php file exists. | ||
* | ||
* @link https://codex.wordpress.org/Template_Hierarchy | ||
* | ||
* @package Enskill | ||
*/ | ||
get_header(); | ||
?> | ||
|
||
<main id="main" class="site-main content content-wrap" role="main"> | ||
|
||
<?php | ||
if (have_posts()) : | ||
|
||
/* Start the Loop */ | ||
while (have_posts()) : the_post(); | ||
|
||
/* | ||
* Include the Post-Format-specific template for the content. | ||
* If you want to override this in a child theme, then include a file | ||
* called content-___.php (where ___ is the Post Format name) and that will be used instead. | ||
*/ | ||
get_template_part('template-parts/content', 'post'); | ||
|
||
endwhile; | ||
|
||
the_posts_navigation(); | ||
|
||
else : | ||
|
||
get_template_part('template-parts/content', 'none'); | ||
|
||
endif; | ||
?> | ||
|
||
</main><!-- #main --> | ||
|
||
<?php | ||
get_footer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* The template for displaying all single posts. | ||
* | ||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | ||
* | ||
* @package Enskill | ||
*/ | ||
get_header(); | ||
?> | ||
|
||
<main id="main" class="site-main content content-wrap" role="main"> | ||
|
||
<?php | ||
while (have_posts()) : the_post(); | ||
|
||
get_template_part('template-parts/content', 'post'); | ||
|
||
the_post_navigation(); | ||
|
||
// If comments are open or we have at least one comment, load up the comment template. | ||
if (comments_open() || get_comments_number()) : | ||
comments_template(); | ||
endif; | ||
|
||
endwhile; // End of the loop. | ||
?> | ||
|
||
</main><!-- #main --> | ||
|
||
<?php | ||
get_footer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* Template part for displaying posts. | ||
* | ||
* @link https://codex.wordpress.org/Template_Hierarchy | ||
* | ||
* @package Enskill | ||
*/ | ||
|
||
?> | ||
|
||
<article id="post-<?php the_ID(); ?>" <?php post_class('row'); ?> itemscope="" itemtype="http://schema.org/BlogPosting" itemprop="blogPost"> | ||
<div class="col-md-12 col-sm-12"> | ||
<header class="entry-header"> | ||
<?php | ||
if ( is_single() ) { | ||
the_title( '<h2 class="entry-title" itemprop="headline">', '</h2>' ); | ||
} else { | ||
the_title( '<h2 class="entry-title" itemprop="headline"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); | ||
} | ||
|
||
if ( 'post' === get_post_type() ) : ?> | ||
<p class="entry-meta"> | ||
<?php enskill_posted_on(); ?> | ||
</p><!-- .entry-meta --> | ||
<?php | ||
endif; ?> | ||
</header><!-- .entry-header --> | ||
|
||
<div class="entry-content" itemprop="text"> | ||
<?php | ||
the_content( sprintf( | ||
/* translators: %s: Name of current post. */ | ||
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'enskill' ), array( 'span' => array( 'class' => array() ) ) ), | ||
the_title( '<span class="screen-reader-text">"', '"</span>', false ) | ||
) ); | ||
|
||
wp_link_pages( array( | ||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'enskill' ), | ||
'after' => '</div>', | ||
) ); | ||
?> | ||
</div><!-- .entry-content --> | ||
|
||
<footer class="entry-footer"> | ||
<?php enskill_entry_footer(); ?> | ||
</footer><!-- .entry-footer --> | ||
</div> | ||
</article><!-- #post-## --> |