Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 19th, 2012  |  syntax: PHP  |  size: 2.91 KB  |  hits: 34  |  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.                         <!--BEGIN #primary .hfeed-->
  4.                         <div id="primary" class="hfeed">
  5.                                
  6.                 <!--BEGIN #masonry-->
  7.                 <div id="masonry">
  8.                
  9.                         <?php
  10.                                         $search = get_search_query();
  11.                                        
  12.                                         $empty = 'data-empty="'.__('No more posts available.', 'framework').'" ';
  13.                                        
  14.                                         $src = 'data-src="'.get_template_directory_uri().'/includes/get-posts.php" ';
  15.                                        
  16.                                         $offset = 'data-offset="'.get_option('posts_per_page').'" ';
  17.                                        
  18.                     $post_count = $wp_query->found_posts;
  19.                                        
  20.                                         $post_count = $post_count - get_option('posts_per_page');
  21.                                        
  22.                                         if($post_count <= 0)
  23.                                                 $post_count = 0;
  24.                                        
  25.                                         ?>
  26.                    
  27.                                         <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  28.                     <?php
  29.                    
  30.                         // The following determines what the post format is and shows the correct file accordingly
  31.                         $format = get_post_format();
  32.                         get_template_part( 'includes/'.$format );
  33.                        
  34.                         if($format == '')
  35.                         get_template_part( 'includes/standard' );
  36.                        
  37.                     ?>
  38.                     <?php endwhile; endif; ?>
  39.  
  40.                 <!--END #masonry-->
  41.                 </div>
  42.                
  43.                 <!--BEGIN .navigation .page-navigation -->
  44.                 <div id="index-navigation" class="hidden navigation page-navigation">
  45.                     <div class="nav-next"><?php next_posts_link(__('Next Posts &rarr;', 'framework')) ?></div>
  46.                     <div class="nav-previous"><?php previous_posts_link(__('&larr; Previous Posts', 'framework')) ?></div>
  47.                 <!--END .navigation .page-navigation -->
  48.                 </div>
  49.                
  50.                 <div class="ready" id="new-posts"></div>
  51.  
  52.                 <!--BEGIN #load-more-link-->
  53.                 <div id="load-more-link">
  54.                
  55.                      <a <?php echo $empty; echo $src; echo $offset; echo 'data-search="' . $search . '"'; ?>href="#">
  56.                      
  57.                                                         <?php _e('Load More...', 'framework'); ?>
  58.                             <span>
  59.                                 <span data-src="<?php echo get_template_directory_uri(); ?>/images/<?php if(get_option('tz_alt_stylesheet') == 'dark.css'):?>dark<?php else: ?>light<?php endif; ?>/ajax-loader.gif" id="post-count">
  60.                                     <?php echo $post_count; ?>
  61.                                 </span>
  62.                                 <span data-text="<?php _e('Remaining', 'framework'); ?>" id="remaining"><?php _e('Remaining', 'framework'); ?></span>
  63.                             </span>
  64.                     </a>
  65.                 <!--END #load-more-link-->
  66.                 </div>
  67.  
  68.                         <!--END #primary .hfeed-->
  69.                         </div>
  70.  
  71. <?php get_footer(); ?>