WordPress.org

Ready to get started?Download WordPress

Forums

Loop wont show the_date or the_title of the page (1 post)

  1. justinledelson
    Member
    Posted 1 year ago #

    Hello,

    I am trying to get my archives page to show the title of the page, ex. Archives of July 2013. and the date for each post. For some reason, It is only showing the title of the first blog post and the date show up only for the first blog post too.

    See it live: http://vividcandi.net/telescope/2013/07/

    Here is my code.

    <?php get_header(); ?>
    
    <!-- Row for main content area -->
    	<div id="side-nav" class="small-12 large-3 columns">
    		<div class="side-area">
    		<h2>
    			Recent Posts
    		</h2>
    		<hr />
    		<ul>
    		<?php query_posts('category_name=blog&showposts=15'); ?>
                    <?php while (have_posts()) : the_post(); ?>
    				<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a><?php the_date(); ?></li>
    				<?php endwhile; ?>
    				<?php wp_reset_query() ?>
            </ul>
    		</div>
            <div class="side-area">
    			<h2>Archive</h2>
    			<hr />
    			<ul>
    				<?php get_archives(); ?>
    			</ul>
            </div>
    	</div>
    	<div class="small-12 large-8 columns" role="main" id="content">
    	<h1 class="entry-title"><?php the_title(); ?></h1>
    	<?php /* Start loop */ ?>
    	<?php while (have_posts()) : the_post(); ?>
    		<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
    			<header>
    				<a href="<?php the_permalink() ?>"><h1 class="entry-title"><?php the_title(); ?></h1></a>
    			</header>
    			<div class="entry-content">
    		    	<?php
    					if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    						the_post_thumbnail();
    						}
    				?>
    				<?php the_excerpt(); ?>
    			</div>
    			<div class="read-more"><a class="button" href="<?php the_permalink() ?>">Read More</a></div>
    		</article>
    	<?php endwhile; // End the loop ?>
    	 <?php wp_reset_query() ?>
    
    	</div>
    
    <?php get_footer(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic