The WordPress Loop WordCamp 2010

  • 709 views
Uploaded on

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

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

More in: Design , Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
709
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. The Loop Adding even more functionality...
  • 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. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  • 4. <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
  • 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. <div class="entry"> <?php the_content('Read the rest of this entry &raquo;'); ?> </div>
  • 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. Demo