Return to Snippet

Revision: 39646
at January 20, 2011 05:21 by slcwebapps


Updated Code
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> 
    <h1><?php the_title(); ?></h1>
    <?php the_content(); ?>
<?php endwhile; ?>
<?php endif; ?>

Revision: 39645
at January 19, 2011 13:54 by slcwebapps


Initial Code
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>



    <div class="post">

      <div class="post-title">

        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

        <span class="post-dates"><?php the_time('F jS, Y') ?></span><?php if (is_page()) { } else { ?><span class="post-cat"><?php the_category(', ') ?></span><?php } ?> <span class="post-comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span> </div>

      <div class="entry">

    <?php the_content('Read the rest of this entry &raquo;'); ?>

      </div>

    </div>



<?php comments_template(); ?>



<?php endwhile; ?>



    <div class="navigation"><span class="previous-entries"><?php next_posts_link('Older Entries') ?></a></span><span class="next-entries"><?php previous_posts_link('Newer Entries') ?></span> </div>



	<?php else : ?>



		<h2>Not Found</h2>

		<p>Sorry, but you are looking for something that isn't here.</p>



	<?php endif; ?>

Initial URL


Initial Description


Initial Title
Sample Wordpress Loop

Initial Tags
wordpress

Initial Language
PHP