Browse Source

Added single-post support

Still a lot of work to do.
master
Kondou 8 years ago
parent
commit
1a8c223cae
3 changed files with 43 additions and 4 deletions
  1. +15
    -2
      comments.php
  2. +1
    -1
      index.php
  3. +27
    -1
      single.php

+ 15
- 2
comments.php View File

@ -1,3 +1,16 @@
<?php if (post_password_required()) return;?>
<div id="comments">
<?php if (have_comments()) : ?>
<h3>Comments</h3>
<ol class="commentlist"><?php wp_list_comments(array('style' => 'ol')); ?></ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
<nav id="comments">
<h3>Comment navigation</h1>
<div class="nav-previous"><?php previous_comments_link("Older Comments"); ?></div>
<div class="nav-next"><?php next_comments_link('Newer Comments'); ?></div>
</nav>
<?php
echo("Work in Progress!");
?>
endif;
endif;
comment_form(); ?>
</div>

+ 1
- 1
index.php View File

@ -22,7 +22,7 @@ endwhile;
endif;
?>
</div>
<?php get_sidebar(); ?>
<?php
get_sidebar();
get_footer();
?>

+ 27
- 1
single.php View File

@ -1,3 +1,29 @@
<?php
echo("Work in Progress!");
get_header();
?>
<div id="primary">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : ?>
<article>
<?php the_post(); ?>
<h2><?php the_title(); ?></h2>
<div class="post-info">
<span class="time"><?php the_time("j. F Y"); ?></span> by <span class="author"><?php the_author_posts_link(); ?></span> <span class="comments"><?php comments_popup_link("Write a comment", "1 comment", "% comments"); ?></span> <?php edit_post_link(); ?></a>
</div>
<div class="post-content">
<?php the_content(); ?>
</div>
<div class="post-meta">
<span class="categories">Categories: <?php the_category(", "); ?></span>
</div>
<?php comments_template(); ?>
</article>
<?php
endwhile;
endif;
?>
</div>
<?php
get_sidebar();
get_footer();
?>