Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The loop that displays posts.
- *
- * The loop displays the posts and the post content. See
- * http://codex.wordpress.org/The_Loop to understand it and
- * http://codex.wordpress.org/Template_Tags to understand
- * the tags used in it.
- *
- * This can be overridden in child themes with loop.php or
- * loop-template.php, where 'template' is the loop context
- * requested by a template. For example, loop-index.php would
- * be used if it exists and we ask for the loop with:
- * <code>get_template_part( 'loop', 'index' );</code>
- *
- * @package WordPress
- * @subpackage Revolution
- * @since Revolution 1.0
- */
- ?>
- <?php /* If there are no posts to display, such as an empty archive page */ ?>
- <?php if ( ! have_posts() ) : ?>
- <article id="post-0" class="post error404 not-found">
- <h1 class="posttitle"><?php _e( 'Not Found', 'templatesquare' ); ?></h1>
- <div class="entry">
- <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'templatesquare' ); ?></p>
- <?php get_search_form(); ?>
- </div>
- </article>
- <?php endif; ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php /* How to display all posts. */ ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <?php
- if(!is_search()){
- ?>
- <div class="entry-utility">
- <div class="posttime"><span><?php the_time('M d') ?></span><?php the_time('Y') ?></div>
- <div class="postcom"><?php comments_popup_link(__('<span>No</span> Comments', 'templatesquare'), __('<span>1</span> Comments', 'templatesquare'), __('<span>%</span> Comments', 'templatesquare'), '' , __('<span class="commoff">Comments<br/>off</span> ', 'templatesquare')); ?></div>
- </div>
- <?php
- }
- ?>
- <div class="entry-content">
- <?php
- $custom = get_post_custom($post->ID);
- $cf_thumb = (isset($custom["thumb"][0]))? $custom["thumb"][0] : "";
- if($cf_thumb!=""){
- $thumb = '<div class="postimg"><img src='. $cf_thumb .' alt="" class="scale-with-grid"/></div>';
- }elseif(has_post_thumbnail($post->ID) ){
- $thumb = '<div class="postimg">'.get_the_post_thumbnail($post->ID, 'post-blog', array('alt' => '', 'class' => 'scale-with-grid')).'</div>';
- }else{
- $thumb ="";
- }
- ?>
- <?php
- if(!is_search()){
- echo $thumb;
- }
- ?>
- <h2 class="posttitle">
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'templatesquare' ), the_title_attribute( 'echo=0' ) ); ?>" data-rel="bookmark"><?php the_title(); ?></a>
- </h2>
- <?php the_content(__('Continue Reading →', 'templatesquare')); ?>
- </div>
- <div class="clear"></div>
- </article><!-- end post -->
- <?php comments_template( '', true ); ?>
- <?php endwhile; // End the loop. Whew. ?>
- <div class="pagenavi">
- <?php paginate();?>
- </div>
- <?php wp_reset_query();?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement