content files

This commit is contained in:
Vladimir Vassilev 2014-09-30 15:58:34 +03:00
parent 3cd6cc1f65
commit 42d3a978b7
5 changed files with 45 additions and 0 deletions

9
entry-content.php Normal file
View File

@ -0,0 +1,9 @@
<section class="entry-content">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
<?php the_content(); ?>
<div class="entry-links"><?php wp_link_pages(); ?></div>
</section>

9
entry-footer.php Normal file
View File

@ -0,0 +1,9 @@
<footer class="entry-footer">
<span class="cat-links"><?php _e( 'Categories: ', 'blankslate' ); ?><?php the_category( ', ' ); ?></span>
<span class="tag-links"><?php the_tags(); ?></span>
<?php
if ( comments_open() ) {
echo '<span class="meta-sep">|</span> <span class="comments-link"><a href="' . get_comments_link() . '">' . sprintf( __( 'Comments', 'initfest' ) ) . '</a></span>';
}
?>
</footer>

5
entry-meta.php Normal file
View File

@ -0,0 +1,5 @@
<section class="entry-meta">
<span class="author vcard"><?php the_author_posts_link(); ?></span>
<span class="meta-sep"> | </span>
<span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span>
</section>

6
entry-summary.php Normal file
View File

@ -0,0 +1,6 @@
<section class="entry-summary">
<?php the_excerpt(); ?>
<?php if( is_search() ) { ?>
<div class="entry-links"><?php wp_link_pages(); ?></div
><?php } ?>
</section>

16
entry.php Normal file
View File

@ -0,0 +1,16 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<?php
if ( is_singular() ) {
echo '<h1 class="entry-title">';
} else {
echo '<h2 class="entry-title">';
} ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
<?php if ( is_singular() ) { echo '</h1>'; } else { echo '</h2>'; } ?>
<?php edit_post_link(); ?>
<?php if ( !is_search() ) get_template_part( 'entry', 'meta' ); ?>
</header>
<?php get_template_part( 'entry', ( is_archive() || is_search() ? 'summary' : 'content' ) ); ?>
<?php if ( !is_search() ) get_template_part( 'entry-footer' ); ?>
</article>