Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

Main Index Template

By: STATEDLIGHT on Jan 21st, 2013  |  syntax: None  |  size: 3.08 KB  |  views: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php get_header(); ?>
  2.  
  3. <div id="content">
  4.   <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
  5.   <?php } ?>
  6.   <?php while ( have_posts() ) : the_post() ?>
  7.   <div id="post-<?php the_ID(); ?>" class='<?php echo (++$j % 2 == 0) ? 'evenpost' : 'oddpost'; ?>'>
  8.     <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Read', 'tiger'), the_title_attribute('echo=0') ); ?>" rel="bookmark">
  9.       <?php tiger_truncate_title(20); ?>
  10.       </a></h2>
  11.     <?php $tiger_thumbs_blog = get_option('tiger_thumbs_blog');
  12. if ($tiger_thumbs_blog == "true"): ?>
  13.     <?php if ( has_post_thumbnail() ): $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
  14.     <a href="<?php the_permalink(); ?>" title="<?php printf( __('Read', 'tiger'), the_title_attribute('echo=0') ); ?>" rel="bookmark">
  15.     <?php the_post_thumbnail( 'blog-thumb' ); ?>
  16.     </a>
  17.     <?php else: ?>
  18.     <a href="<?php the_permalink(); ?>" title="<?php printf( __('Read', 'tiger'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><img src="<?php echo get_template_directory_uri(); ?>/images/awaiting-image.jpg" alt="Awaiting image" class="blog-thumb" /></a>
  19.     <?php endif; ?>
  20.     <?php endif; ?>
  21.     <div class="entry-meta"> <span class="meta-prep meta-prep-author">
  22.       <?php _e('By ', 'tiger'); ?>
  23.       </span> <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>" title="<?php printf( __( 'View all articles by %s', 'tiger' ), $authordata->display_name ); ?>">
  24.       <?php the_author(); ?>
  25.       </a></span> <span class="meta-sep"> | </span> <span class="meta-prep meta-prep-entry-date">
  26.       <?php _e('Published ', 'tiger'); ?>
  27.       </span> <span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>">
  28.       <?php the_time( get_option( 'date_format' ) ); ?>
  29.       </abbr></span>
  30.       <?php edit_post_link( __( 'Edit', 'tiger' ), "<span class=\"meta-sep\"> | </span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ) ?>
  31.     </div>
  32.     <div class="entry-content">
  33.       <?php $tiger_thumbs_blog = get_option('tiger_thumbs_blog');
  34. if ($tiger_thumbs_blog == "true"): ?>
  35.       <?php tiger_truncate_post(320); ?>
  36.       <?php else: ?>
  37.       <?php tiger_truncate_post(650); ?>
  38.       <?php endif; ?>
  39.     </div>
  40.   </div>
  41.   <?php endwhile; ?>
  42.   <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
  43.   <div id="nav-below" class="navigation">
  44.     <?php if(function_exists('wp_pagenavi')) { ?>
  45.     <?php wp_pagenavi(); ?>
  46.     <?php } else { ?>
  47.     <div class="nav-previous">
  48.       <?php next_posts_link(__( '<span class="meta-nav">&laquo;</span> older articles', 'tiger' )) ?>
  49.     </div>
  50.     <div class="nav-next">
  51.       <?php previous_posts_link(__( 'newer articles <span class="meta-nav">&raquo;</span>', 'tiger' )) ?>
  52.     </div>
  53.     <?php }  ?>
  54.   </div>
  55.   <?php } ?>
  56.   <div class="clear-floats"></div>
  57. </div>
  58. <div id="sidebar">
  59.   <?php dynamic_sidebar('right'); ?>
  60. </div>
  61. <?php get_footer(); ?>