Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
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
Próxima SlideShare
Cargando en…5
×

The WordPress Loop WordCamp 2010

1.083 visualizaciones

Publicado el

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

  • Sé el primero en comentar

  • Sé el primero en recomendar esto

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

×