Post Döngüsü
index.php
<?php get_header(); ?>
<h1> Forumlogs.com </h1>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<h2> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></h2>
<?php the_post_thumbnail(); ?>
<?php the_excerpt(); ?>
<?php endwhile; else: ?>
<?php _e( 'Sorry, no posts matched your criteria.', 'textdomain' ); ?>
<?php endif; ?>
<?php get_footer(); ?>
single.php
<?php get_header(); ?>
<?php
while ( have_posts() ) : the_post();
if ( comments_open() || get_comments_number() ) {
comments_template();
}
endwhile;
?>
<?php get_footer();