Move the Loop into a separate file. Reduces code duplication and adds Gallery/Aside styling to all archive views. See #9015
git-svn-id: http://svn.automattic.com/wordpress/trunk@13141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e4283aed00
commit
38a77b72cb
|
@ -11,52 +11,13 @@
|
|||
<h1 class="page-title"><?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('F Y') ); ?></h1>
|
||||
<?php elseif ( is_year() ) : ?>
|
||||
<h1 class="page-title"><?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y') ); ?></h1>
|
||||
<?php elseif ( isset($_GET['paged']) && !empty($_GET['paged']) ) : ?>
|
||||
<?php else : ?>
|
||||
<h1 class="page-title"><?php _e( 'Blog Archives', 'twentyten' ); ?></h1>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php rewind_posts(); ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-above" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-above -->
|
||||
<?php } ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( get_the_time() ); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"><?php _e(' by ', 'twentyten'); ?></span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list(', '); ?></span>
|
||||
<span class="meta-sep"><?php _e( ' | ', 'twentyten' ); ?></span>
|
||||
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-below" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-below -->
|
||||
<?php } ?>
|
||||
<?php include 'loop.php'; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #container -->
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<?php the_post(); ?>
|
||||
|
||||
<h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'twentyten' ), "<a class='url fn n' href='$authordata->user_url' title='" . esc_attr($authordata->display_name) . "' rel='me'>" . esc_html($authordata->display_name) . "</a>" ); ?></h1>
|
||||
<h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'twentyten' ), "<a class='url fn n' href='$authordata->user_url' title='" . esc_attr(get_the_author()) . "' rel='me'>" . get_the_author() . "</a>" ); ?></h1>
|
||||
|
||||
<?php if ( get_the_author_meta('description') ) : // If a user has filled out their decscription show a bio on their entries ?>
|
||||
<div id="entry-author-info">
|
||||
|
@ -13,7 +13,7 @@
|
|||
<?php echo get_avatar( get_the_author_meta('user_email'), apply_filters('twentyten_author_bio_avatar_size', 60) ); ?>
|
||||
</div><!-- #author-avatar -->
|
||||
<div id="author-description">
|
||||
<h2><?php _e('About ', 'twentyten'); ?><?php the_author(); ?></h2>
|
||||
<h2><?php printf(__('About %s', 'twentyten'), get_the_author()); ?></h2>
|
||||
<?php the_author_meta('description'); ?>
|
||||
</div><!-- #author-description -->
|
||||
</div><!-- .entry-author-info -->
|
||||
|
@ -21,44 +21,7 @@
|
|||
|
||||
<?php rewind_posts(); ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-above" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-above -->
|
||||
<?php } ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', ' ); ?></span>
|
||||
<span class="meta-sep"> | </span>
|
||||
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-below" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-below -->
|
||||
<?php } ?>
|
||||
<?php include 'loop.php'; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #container -->
|
||||
|
|
|
@ -10,48 +10,7 @@
|
|||
|
||||
<?php rewind_posts(); ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-above" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-above -->
|
||||
<?php } ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"><?php _e(' by ', 'twentyten'); ?></span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<?php if ( $cats_meow = cats_meow( ', ' ) ) : // Returns categories other than the one queried ?>
|
||||
<span class="cat-links"><?php printf( __( 'Also posted in %s', 'twentyten' ), $cats_meow ); ?></span>
|
||||
<span class="meta-sep"><?php _e( ' | ', 'twentyten' ); ?></span>
|
||||
<?php endif ?>
|
||||
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-below" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-below -->
|
||||
<?php } ?>
|
||||
<?php include 'loop.php'; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #container -->
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<?php get_sidebar( 'footer' ); ?>
|
||||
|
||||
<div id="site-info">
|
||||
<a href="<?php echo home_url() ?>/" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
|
||||
<a href="<?php echo home_url('/') ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
|
||||
</div>
|
||||
|
||||
<div id="site-generator">
|
||||
|
|
|
@ -39,14 +39,13 @@
|
|||
<div id="masthead">
|
||||
|
||||
<div id="branding">
|
||||
<div id="site-title"><span><a href="<?php echo home_url(); ?>/" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></div>
|
||||
<div id="site-title"><span><a href="<?php echo home_url('/'); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></div>
|
||||
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
|
||||
|
||||
<?php
|
||||
global $post;
|
||||
if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
|
||||
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
|
||||
} else { ?>
|
||||
if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
|
||||
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
|
||||
} else { ?>
|
||||
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
|
||||
<?php } ?>
|
||||
</div><!-- #branding -->
|
||||
|
|
|
@ -3,101 +3,9 @@
|
|||
<div id="container">
|
||||
<div id="content">
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-above" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-above -->
|
||||
<?php } ?>
|
||||
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<?php if ( in_category( 'Gallery' ) ) { ?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-content">
|
||||
<div class="gallery-thumb">
|
||||
<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php
|
||||
$images =& get_children( array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999) );
|
||||
$total_images = count($images);
|
||||
$image = array_shift($images);
|
||||
echo wp_get_attachment_image( $image->ID, 'thumbnail' );
|
||||
?></a>
|
||||
</div>
|
||||
<p><em><?php printf( __('This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten'), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"', $total_images ); ?></em></p>
|
||||
|
||||
<?php the_excerpt( '' ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<?php
|
||||
$category_id = get_cat_ID( 'Gallery' );
|
||||
$category_link = get_category_link( $category_id );
|
||||
?>
|
||||
<a href="<?php echo $category_link; ?>" title="<?php esc_attr_e('View posts in the Gallery category', 'twentyten'); ?>"><?php _e('More Galleries', 'twentyten'); ?></a>
|
||||
<span class="meta-sep"><?php __( ' | ', 'twentyten' ); ?></span>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div>
|
||||
|
||||
|
||||
<?php } elseif ( in_category( 'asides' ) ) { ?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
<span class="meta-sep"><?php __( ' | ', 'twentyten' ); ?></span>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
|
||||
<?php } else { ?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||
<a href="<?php
|
||||
the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
<?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>'); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', ' ); ?></span>
|
||||
<span class="meta-sep"><?php __( ' | ', 'twentyten' ); ?></span>
|
||||
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php comments_template( '', true ); ?>
|
||||
|
||||
<?php } ?>
|
||||
<?php endwhile; ?>
|
||||
<?php else : ?>
|
||||
<?php if ( have_posts() ) :
|
||||
include 'loop.php';
|
||||
else : ?>
|
||||
<h2><?php _e( 'Not Found', 'twentyten' ); ?></h2>
|
||||
<div class="entry-content">
|
||||
<p><?php _e( 'Apologies, but we were unable to find what you were looking for. Perhaps searching will help.', 'twentyten' ); ?></p>
|
||||
|
@ -105,13 +13,6 @@ the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="en
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-below" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-below -->
|
||||
<?php } ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #container -->
|
||||
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
<?php if ( $wp_query->max_num_pages > 1 ) { ?>
|
||||
<div id="nav-above" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-above -->
|
||||
<?php } ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php if ( in_category( 'Gallery' ) ) { ?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-content">
|
||||
<div class="gallery-thumb">
|
||||
<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php
|
||||
$images =& get_children( array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999) );
|
||||
$total_images = count($images);
|
||||
$image = array_shift($images);
|
||||
echo wp_get_attachment_image( $image->ID, 'thumbnail' );
|
||||
?></a>
|
||||
</div>
|
||||
<p><em><?php printf( __('This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten'), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"', $total_images ); ?></em></p>
|
||||
|
||||
<?php the_excerpt( '' ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<?php
|
||||
$category_id = get_cat_ID( 'Gallery' );
|
||||
$category_link = get_category_link( $category_id );
|
||||
?>
|
||||
<a href="<?php echo $category_link; ?>" title="<?php esc_attr_e('View posts in the Gallery category', 'twentyten'); ?>"><?php _e('More Galleries', 'twentyten'); ?></a>
|
||||
<span class="meta-sep"><?php __( ' | ', 'twentyten' ); ?></span>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div>
|
||||
|
||||
|
||||
<?php } elseif ( in_category( 'asides' ) ) { ?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"> <?php _e( ' by ', 'twentyten' ); ?> </span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
<span class="meta-sep"><?php __( ' | ', 'twentyten' ); ?></span>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
|
||||
<?php } else { ?>
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span>
|
||||
<a href="<?php
|
||||
the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<?php if ( is_archive() || is_search() ) : //Only display Excerpts for archives & search ?>
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
<?php else : ?>
|
||||
<div class="entry-content">
|
||||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
<?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>'); ?>
|
||||
</div><!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-utility">
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', ' ); ?></span>
|
||||
<span class="meta-sep"><?php __( ' | ', 'twentyten' ); ?></span>
|
||||
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php comments_template( '', true ); ?>
|
||||
|
||||
<?php } ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php if ( $wp_query->max_num_pages > 1 ) { ?>
|
||||
<div id="nav-below" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-below -->
|
||||
<?php } ?>
|
|
@ -4,57 +4,9 @@
|
|||
<div id="content">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<h1 class="page-title"><?php _e( 'Search Results for: ', 'twentyten' ); ?><span><?php the_search_query(); ?></span></h1>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-above" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-above -->
|
||||
<?php } ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<?php if ( $post->post_type != 'page' ) : ?>
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
<?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>' ); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
|
||||
<?php if ( $post->post_type != 'page' ) : ?>
|
||||
<div class="entry-utility">
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list(', '); ?></span>
|
||||
<span class="meta-sep"> | </span>
|
||||
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
<?php endif; ?>
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-below" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-below -->
|
||||
<?php } ?>
|
||||
|
||||
<?php include 'loop.php'; ?>
|
||||
<?php else : ?>
|
||||
|
||||
<div id="post-0" class="post no-results not-found">
|
||||
<h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2>
|
||||
<div class="entry-content">
|
||||
|
@ -62,9 +14,7 @@
|
|||
<?php get_search_form(); ?>
|
||||
</div><!-- .entry-content -->
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #container -->
|
||||
|
||||
|
|
|
@ -9,48 +9,7 @@
|
|||
|
||||
<?php rewind_posts(); ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-above" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-above -->
|
||||
<?php } ?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
|
||||
|
||||
<div class="entry-meta">
|
||||
<span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
|
||||
<span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span>
|
||||
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
<div class="entry-summary">
|
||||
<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
|
||||
</div><!-- .entry-summary -->
|
||||
|
||||
<div class="entry-utility">
|
||||
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', ' ); ?></span>
|
||||
<span class="meta-sep"><?php _e( ' | ', 'twentyten' ); ?></span>
|
||||
<?php if ( $tag_ur_it = tag_ur_it(', ') ) : // Returns tags other than the one queried ?>
|
||||
<span class="tag-links"><?php printf( __( 'Also tagged %s', 'twentyten' ), $tag_ur_it ); ?></span>
|
||||
<?php endif; ?>
|
||||
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
|
||||
<?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?>
|
||||
</div><!-- #entry-utility -->
|
||||
</div><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
|
||||
<div id="nav-below" class="navigation">
|
||||
<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>
|
||||
<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>
|
||||
</div><!-- #nav-below -->
|
||||
<?php } ?>
|
||||
<?php include 'loop.php'; ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #container -->
|
||||
|
|
Loading…
Reference in New Issue