Advertisement
grappler

blog-excerpt.php - small thumbnail - Shell lite

Dec 25th, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.48 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Theme's Blog
  4.  *
  5.    Template Name: Blog Excerpt
  6.  *
  7.  * @file           blog-excerpt.php
  8.  * @package        WordPress
  9.  * @subpackage     Highlander
  10.  * @author         Emil Uzelac
  11.  * @copyright      2010 - 2012 ThemeID
  12.  * @license        license.txt
  13.  * @version        Release: 1.0
  14.  * @filesource     wp-content/themes/shell-lite/blog-excerpt.php
  15.  * @link           http://codex.wordpress.org/Templates
  16.  * @since          available since Release 1.0
  17.  */
  18. ?>
  19. <?php get_header(); ?>
  20.  
  21.         <div id="content-blog" class="grid col-620">
  22. <?php
  23.     if ( get_query_var('paged') )
  24.         $paged = get_query_var('paged');
  25.     elseif ( get_query_var('page') )
  26.         $paged = get_query_var('page');
  27.     else
  28.         $paged = 1;
  29.         query_posts("post_type=post&paged=$paged");
  30. ?>  
  31.             <div class="currently-in"><?php _e( 'You\'re in all Blogs Section', 'shell' ); ?></div>      
  32. <?php if (have_posts()) : ?>
  33.  
  34.         <?php while (have_posts()) : the_post(); ?>
  35.        
  36.             <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  37.                
  38.                 <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'shell'), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></h1>
  39.                
  40.                 <div class="post-meta">
  41.                 <?php
  42.                     printf( __( '<span class="%1$s">Posted on</span> %2$s by %3$s', 'shell' ),'meta-prep meta-prep-author',
  43.                     sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>',
  44.                         get_permalink(),
  45.                         esc_attr( get_the_time() ),
  46.                         get_the_date()
  47.                     ),
  48.                     sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
  49.                         get_author_posts_url( get_the_author_meta( 'ID' ) ),
  50.                     sprintf( esc_attr__( 'View all posts by %s', 'shell' ), get_the_author() ),
  51.                         get_the_author()
  52.                         )
  53.                     );
  54.                 ?>
  55.                     <?php if ( comments_open() ) : ?>
  56.                         <span class="comments-link">
  57.                         <span class="mdash">&mdash;</span>
  58.                     <?php comments_popup_link(__('No Comments &darr;', 'shell'), __('1 Comment &darr;', 'shell'), __('% Comments &darr;', 'shell')); ?>
  59.                         </span>
  60.                     <?php endif; ?>
  61.                 </div><!-- end of .post-meta -->
  62.                
  63.                 <div class="post-entry">
  64.                     <?php if ( has_post_thumbnail()) : ?>
  65.                         <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  66.                     <?php the_post_thumbnail('thumbnail'); ?>
  67.                         </a>
  68.                     <?php endif; ?>
  69.                     <?php the_excerpt(); ?>
  70.                     <?php wp_link_pages(array('before' => '<div class="pagination">' . __('Pages:', 'shell'), 'after' => '</div>')); ?>
  71.                 </div><!-- end of .post-entry -->
  72.                
  73.                 <div class="post-data">
  74.                     <?php the_tags(__('Tagged with:', 'shell') . ' ', ', ', '<br />'); ?>
  75.                     <?php printf(__('Posted in %s', 'shell'), get_the_category_list(', ')); ?>
  76.                 </div><!-- end of .post-data -->            
  77.  
  78.             <div class="post-edit"><?php edit_post_link(__('Edit', 'shell')); ?></div>              
  79.             </div><!-- end of #post-<?php the_ID(); ?> -->
  80.            
  81.         <?php endwhile; ?>
  82.        
  83.         <?php if (  $wp_query->max_num_pages > 1 ) : ?>
  84.         <div class="navigation">
  85.             <div class="previous"><?php next_posts_link( __( '&#8249; Older posts', 'shell' ) ); ?></div>
  86.             <div class="next"><?php previous_posts_link( __( 'Newer posts &#8250;', 'shell' ) ); ?></div>
  87.         </div><!-- end of .navigation -->
  88.         <?php endif; ?>
  89.  
  90.         <?php else : ?>
  91.  
  92.         <h1 class="title-404"><?php _e('404 &#8212; Fancy meeting you here!', 'shell'); ?></h1>
  93.         <p><?php _e('Don\'t panic, we\'ll get through this together. Let\'s explore our options here.', 'shell'); ?></p>
  94.         <h6><?php _e( 'You can return', 'shell' ); ?> <a href="<?php echo home_url(); ?>/" title="<?php esc_attr_e( 'home', 'shell' ); ?>"><?php _e( '&#9166; Home', 'shell' ); ?></a> <?php _e( 'or search for the page you were looking for', 'shell' ); ?></h6>
  95.         <?php get_search_form(); ?>
  96.        
  97. <?php endif; ?>  
  98.      
  99.         </div><!-- end of #content -->
  100.  
  101. <?php get_sidebar(); ?>
  102. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement