Repeat "The Loop" eight times
-
I’m trying my hand at theme writing and I need some help. I’ve managed to get my front page content into two columns (see code below) and I want to have 8 rows of 2-column posts, but have no clue how to do it. I’ve tried various loops in PHP but they don’t work. I want to learn how to write my own themes: but you have to start somewhere, and right now I’m stuck. Please help!
‘<div id=”primary” class=”content-area”>
<div id=”content” class=”site-content” role=”main”>
<div class=”t”>
<div class=”tr”>
<div class=”tc”>
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<header class=”entry-header”>
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<div class=”entry-thumbnail”>
<?php the_post_thumbnail(); ?>
</div>
<?php endif; ?>
<h1 class=”entry-title”><?php the_title(); ?></h1>
</header><!– .entry-header –>
<div class=”entry-content”>
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class=”page-links”><span class=”page-links-title”>’ . __( ‘Pages:’, ‘pscthemeone’ ) . ‘</span>’, ‘after’ => ‘</div>’, ‘link_before’ => ‘<span>’, ‘link_after’ => ‘</span>’ ) ); ?>
</div><!– .entry-content –><footer class=”entry-meta”>
<?php edit_post_link( __( ‘Edit’, ‘pscthemeone’ ), ‘<span class=”edit-link”>’, ‘</span>’ ); ?>
</footer><!– .entry-meta –>
</article><!– #post –>
<?php comments_template(); ?>
<?php endwhile; ?>
</div><!– tc –>
<div class=”tc”>
REPEAT THE LOOP CODE HERE
</div><!– tc –>
</div><!– tr –>
</div><!– t –>
</div><!– #content –>
</div><!– #primary –>’
- The topic ‘Repeat "The Loop" eight times’ is closed to new replies.