Make WordPress Core


Ignore:
Timestamp:
03/29/2010 10:03:15 PM (15 years ago)
Author:
nacin
Message:

Rough cut of Twenty Ten inline documentation. see #12695. props jorbin, demetris.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/loop.php

    r13830 r13885  
     1<?php
     2/**
     3 * The loop that displays posts
     4 *
     5 * The loop displays the posts and the post content.  See
     6 * http://codex.wordpress.org/The_Loop to understand it and
     7 * http://codex.wordpress.org/Template_Tags to understand
     8 * the tags used in it.
     9 *
     10 * @package WordPress
     11 * @subpackage Twenty Ten
     12 * @since 3.0.0
     13 */
     14?>
     15
     16<?php /* Display navigation to next/previous pages when applicable  */ ?>
    117<?php if ( $wp_query->max_num_pages > 1 ) : ?>
    218    <div id="nav-above" class="navigation">
     
    622<?php endif; ?>
    723
     24<?php /* If there are no posts to display, such as an empty archive page  */ ?>
    825<?php if ( ! have_posts() ) : ?>
    926    <div id="post-0" class="post error404 not-found">
     
    1633<?php endif; ?>
    1734
     35<?php /* Start the Loop  */ ?>
    1836<?php while ( have_posts() ) : the_post(); ?>
     37
     38<?php /* How to Display posts in the Gallery Category  */ ?>
    1939    <?php if ( in_category( 'Gallery' ) ) : ?>
    2040        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     
    6383        </div>
    6484
    65 
     85<?php /* How to display posts in the asides category */ ?>
    6686    <?php elseif ( in_category( 'asides' ) ) : ?>
    6787        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     
    93113        </div><!-- #post-<?php the_ID(); ?> -->
    94114
    95 
     115<?php /* How to display all other posts  */ ?>
    96116    <?php else : ?>
    97117        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     
    140160<?php endwhile; ?>
    141161
     162<?php /* Display navigation to next/previous pages when applicable  */ ?>
    142163<?php if (  $wp_query->max_num_pages > 1 ) : ?>
    143164                <div id="nav-below" class="navigation">
Note: See TracChangeset for help on using the changeset viewer.