Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul id="listlatestnews">
- <?php
- //Fix homepage pagination
- if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } else if ( get_query_var('page') ) {$paged = get_query_var('page'); } else {$paged = 1; }
- $temp = $wp_query; // re-sets query
- $wp_query = null; // re-sets query
- $args = array( 'post_type' => array('post'), 'orderby'=>'date', 'order'=>'DESC', 'posts_per_page' => 10, 'paged' => $paged);
- $wp_query = new WP_Query();
- $wp_query->query( $args );
- while ($wp_query->have_posts()) : $wp_query->the_post();
- ?>
- <li>
- <div class="boximg-blog">
- <?php if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {?>
- <div class="blogimage">
- <img src="<?php echo get_template_directory_uri();?>/timthumb.php?src=<?php echo thumb_url();?>&h=84&w=84&zc=1" alt="" class="boximg-pad" />
- </div>
- <?php } ?>
- </div>
- <div class="postbox <?php post_class(); ?>">
- <h3><a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
- <p>
- <?php the_excerpt(__('Continue reading »','example')); ?>
- </p>
- </div>
- <div class="clear"></div>
- <div class="metapost">
- <span class="first"><?php echo __('Posted at ','ecobiz');?><?php the_time( get_option('date_format') ); ?></span> |
- <span><?php echo __('By ','ecobiz');?>: <?php the_author_posts_link();?></span> |
- <span><?php echo __('Categories ','ecobiz');?>: <?php the_category(',');?></span> |
- <span><?php comments_popup_link(__('0 Comment','ecobiz'),__('1 Comment','ecobiz'),__('% Comments','ecobiz'));?></span>
- </div>
- <div class="clear"></div>
- </li>
- <?php endwhile; ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement