loop problem – don't show blog info
-
I have a really simple loop as follows:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id="content_outer"> <div id="content_inner"> <?php get_sidebar(); ?> <div id="content"> <h1><?php the_title(); ?></h1> <small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small> <?php the_content(); ?> Posted in <?php the_category('s, '); ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> | <?php edit_post_link( __( 'Edit' )); ?> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?>
This works for my blog page, all the blog details like author, time & date etc. show, but these details show up on all my other pages as well which I don’t want. Can I add a condition to the loop that will only show these details on the blog page?
I am very new to WP and any help would be great! Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘loop problem – don't show blog info’ is closed to new replies.