Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* Start the Loop.*/ ?>
- <?php
- $recentposts=get_posts('showposts=1');
- if ($recentposts) {
- foreach($recentposts as $post) {
- setup_postdata($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">
- <?php twentyten_posted_on(); ?>
- <?php the_post_thumbnail();?>
- </div><!-- .entry-meta -->
- <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php endif; ?>
- <div class="entry-utility">
- <?php if ( count( get_the_category() ) ) : ?>
- <span class="cat-links">
- <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
- </span>
- <span class="meta-sep">|</span>
- <?php endif; ?>
- <?php
- $tags_list = get_the_tag_list( '', ', ' );
- if ( $tags_list ):
- ?>
- <span class="tag-links">
- <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
- </span>
- <span class="meta-sep">|</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> <span class="edit-link">', '</span>' ); ?>
- </div><!-- .entry-utility -->
- </div><!-- #post-## -->
- <?php comments_template( '', true ); ?>
- <?php
- }
- }
- ?>
- <?php while ( have_posts() ) : the_post();?>
- <?php /* start our two column support */ ?>
- <?php $counter+=1; ?>
- <?php if($counter % 2) : ?>
- <div class="column-left">
- <?php else: ?>
- <div class="column-right">
- <?php endif; ?>
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <div class="alignleft" style="margin: 0 0 10px 0">
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if (class_exists('MultiPostThumbnails')
- && MultiPostThumbnails::has_post_thumbnail('post', 'secondary-image')) :
- MultiPostThumbnails::the_post_thumbnail('post', 'secondary-image'); endif; ?></a>
- </div>
- <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">
- <?php twentyten_posted_on(); ?>
- </div><!-- .entry-meta -->
- <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
- <div class="entry-summary">
- <?php /* Add a conditional image and excertp output */ ?>
- <?php if(has_post_thumbnail()): // Start the condition ?>
- <?php the_excerpt(); ?>
- <?php else : // Offer an alternative ?>
- <?php the_excerpt(); ?>
- <?php endif; // end the condition ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php /* Add a conditional image and excerpt output */ ?>
- <?php if(has_post_thumbnail()): // Start the condition ?>
- <div class="alignleft" style="margin: 0 0 10px 0">
- <?php the_post_thumbnail('small-thumbnail'); ?>
- </div>
- <?php the_excerpt(); ?>
- <?php else : // Offer an alternative ?>
- <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
- <?php endif; // end the condition ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php endif; ?>
- <div class="entry-utility">
- <?php if ( count( get_the_category() ) ) : ?>
- <span class="cat-links">
- <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
- </span>
- <span class="meta-sep">|</span>
- <?php endif; ?>
- <?php
- $tags_list = get_the_tag_list( '', ', ' );
- if ( $tags_list ):
- ?>
- <span class="tag-links">
- <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
- </span>
- <span class="meta-sep">|</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> <span class="edit-link">', '</span>' ); ?>
- </div><!-- .entry-utility -->
- </div><!-- #post-## -->
- <?php comments_template( '', true ); ?>
- <?php /* end our two column support */ ?>
- </div>
- <?php endwhile; // End the loop. Whew. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement