Loop isnt working?
-
Im completely confused and I dont know what to do!
I am developing a static page for a blog of mine. Here’s the html code
<?php /* Template Name: Blog */ ?> <?php get_header(); ?> <div class="blog-container "> <div class="mainblog"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post"> <h1 class="header"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <h2 class="infoheader"><?php the_date(); ?> | <?php the_time('H:i') ?> | <?php the_category(); ?> </h2> <div class="thumbnail"><?php the_post_thumbnail(); ?></div> <?php the_excerpt(); ?> </div> <!--post--> <?php endwhile; endif; ?> </div> <!--mainblog--> <?php get_sidebar(); ?> </div> <!--blog-container--> <div><?php get_footer(); ?></div>All i get is “Protected:blog” and “October 15, 2012 | 10:06 |” underneath it. I have made 2 quick posts which have dummy text and a featured image. (Which is clickable in the sidebar)
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
The topic ‘Loop isnt working?’ is closed to new replies.