Minimal index.php; Is the code solid?
-
<?php get_header(); ?> <div id="content"> <?php if (is_single() || is_category() || is_archive()) {get_sidebar();} ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if (!is_page()) { ?> <div class="post-headline"> <h2> <?php if( !is_single() AND !is_page() ) { ?> <a href="<?php the_permalink() ?>" > <?php } the_title(); if( !is_single() AND !is_page() ) { ?></a> <?php } ?> </h2> </div> <?php } ?><?php if(is_category() || is_archive()) { the_excerpt(); } else { the_content(); } ?><?php endwhile; ?> <?php posts_nav_link(' - ','« Prev','Next »') ?> <?php if (is_single()) {comments_template();} ?> <?php else : ?><?php endif; ?> </div> <?php get_footer(); ?>
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘Minimal index.php; Is the code solid?’ is closed to new replies.