The Loop
Adding even more functionality...
What is the loop?

• The Loop is used by WordPress to display
  each of your posts. Using The Loop,
  WordPress processes ...
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php endwhile; else: ?>

 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<h2>
<a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a>
</h2>

...
<div class="entry">

 <?php the_content('Read the rest of this entry &raquo;'); ?>
</div>
<p class="postmetadata">Posted in <?php the_category(', ') ?>

    <strong>|</strong>

    <?php edit_post_link('Edit','',...
Demo
Upcoming SlideShare
Loading in...5
×

The WordPress Loop WordCamp 2010

760

Published on

Just a presentation that showcases the WordPress loop, and how it can be modified. More info at <a>JakeSpurlock.com</a>

Published in: Design, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
760
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • The WordPress Loop WordCamp 2010

    1. 1. The Loop Adding even more functionality...
    2. 2. What is the loop? • The Loop is used by WordPress to display each of your posts. Using The Loop, WordPress processes each of the posts to be displayed on the current page and formats them according to how they match specified criteria within The Loop tags.
    3. 3. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    4. 4. <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
    5. 5. <h2> <a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"> <?php the_title(); ?></a> </h2> <small><?php the_time('F jS,Y') ?> by <?php the_author() ?></small>
    6. 6. <div class="entry"> <?php the_content('Read the rest of this entry &raquo;'); ?> </div>
    7. 7. <p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    8. 8. Demo
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×