WP code - need to style by date delete lock Revision 653566376333 (Mon Oct 03 2011 at 04:32) - Diff Link to this snippet: https://friendpaste.com/4Syl57AhzvA1QQ7GG176yF Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889<?php get_header(); ?> <div id="main" class="clearfix"> <div id="posts" class="grid_8"> <?php// Global $wp_query so it's available to check for argsglobal $wp_query; $per_page = 10; // Add paging$paged = ( get_query_var('paged') && get_query_var('paged') > 1 ) ? get_query_var('paged') : 1; // Your args$custom_args = array( 'posts_per_page' => $per_page, 'paged' => $paged, 'post__not_in' => get_option('sticky_posts'), 'caller_get_posts'=>1,);// Get the current query vars, if they exist$args = array_filter( $wp_query->query_vars ); // The array filter removes 0, false, null values, etc// If there were args, ie. a non empty array, merge them with the custom ones, else just use the custom ones$args = ( $args && ( is_array( $args ) && !empty( $args ) ) ) ? array_merge( $custom_args , $args ) : $custom_args; // Put the args into the queryquery_posts( $args ); // If the query has results, ie. postsif( have_posts() ) : $counter = 0; // While the query has posts while( have_posts() ) : the_post(); // Increase counter by one, so first is 1, second is 2, etc... $counter++; // If the counter is less then 6, it's one of the first 5 posts if( $counter < 6 ) :?> <div class="post"> <h1 class="post-title"><a href="<?php the_permalink(); ?>" title="Continue reading "<?php the_title(); ?>""><?php the_title(); ?></a></h1> <div class="post-meta clearfix"> <span>Posted: <abbr title="Posted at <?php the_time('H:i') ?> on <?php the_time('l, F j, Y'); ?>"><?php if(!function_exists('how_long_ago')){the_time('l, F j, Y'); } else { echo how_long_ago(get_the_time('U')); } ?></abbr></span> <span>Category: <?php the_category(', ') ?></span> <span>Comments: <?php comments_number('No Comment','1 Comment','% Comments'); ?></span> </div> <div class="post-image"> <?php if( get_post_meta( $post->ID, "image", true ) ) : ?> <img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image", true ); ?>&w=576&zc=1&q=90" border="0" alt="<?php the_title(); ?>" /> <?php else : ?> <?php endif; ?> </div> <div class="post-excerpt"><?php the_content('<span class="post-link">Continue reading »</span>'); ?></div> </div><?php // Else the counter is more then 5, so it's one of the 15 following posts else :?> <div class="post-small"> <?php the_date('', '<br />', '<hr />'); ?> <h1 class="post-title-small"><a href="<?php the_permalink(); ?>" title="Continue reading "<?php the_title(); ?>""><?php the_title(); ?></a></h1> <div class="post-meta clearfix"> <span>Posted: <abbr title="Posted at <?php the_time('H:i') ?> on <?php the_time('l, F j, Y'); ?>"><?php if(!function_exists('how_long_ago')){the_time('l, F j, Y'); } else { echo how_long_ago(get_the_time('U')); } ?></abbr></span> <span>Category: <?php the_category(', ') ?></span> <span>Comments: <?php comments_number('No Comment','1 Comment','% Comments'); ?></span> </div> </div> <?php // End if counter check endif; // End post loop endwhile;// End if have posts checkendif;?> <div class="post-navigation clearfix"><?php if(function_exists('wp_pagenavi')) wp_pagenavi(); ?></div> </div> <div id="sidebar" class="grid_4"> <?php get_sidebar(); ?> </div></div><?php get_footer(); ?>