Advertisement
Guest User

Index.php

a guest
Aug 22nd, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.61 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div class="content">
  3.    
  4. <?php if ( have_posts() ) : ?>
  5.  
  6.     <div id="loop01">
  7.     <?php /* FIRST LOOP: display posts 1 thru 3 */ ?>
  8.     <?php query_posts('showposts=1'); ?>
  9.     <?php $posts = get_posts('numberposts=1&offset=0'); foreach ($posts as $post) : start_wp(); ?>
  10.     <?php static $count1 = 0; if ($count1 == "1") { break; } else { ?>
  11.     <div id="post-destaque">
  12.     <a href="<?php the_permalink(); ?>" /><?php the_title(); ?></a>
  13.     </div>
  14.     <?php $count1++; } ?>
  15.     <?php endforeach; ?>
  16.     </div>
  17.  
  18.     <div id="mais">
  19.             <div class="navegacao">
  20.         <?php posts_nav_link('&#8734;','&laquo;','&raquo;'); ?>
  21.             </div>
  22.         </div>
  23.  
  24.     <div id="loop02">
  25.     <?php /* // SECOND LOOP: display posts 4 thru 6 */ ?>
  26.     <?php query_posts('showposts=3'); ?>
  27.     <?php $posts = get_posts('numberposts=3&offset=1'); foreach ($posts as $post) : start_wp(); ?>
  28.     <?php static $count2 = 0; if ($count2 == "3") { break; } else { ?>
  29.     <div id="post">
  30.     <a href="<?php the_permalink(); ?>" /><?php the_title(); ?></a>
  31.     </div>
  32.     <?php $count2++; } ?>
  33.     <?php endforeach; ?>
  34.     </div>
  35.    
  36.     <div id="loop03">
  37.     <?php /* // THIRD LOOP: display posts 7 thru 9 */ ?>
  38.     <?php query_posts('showposts=3'); ?>
  39.     <?php $posts = get_posts('numberposts=3&offset=4'); foreach ($posts as $post) : start_wp(); ?>
  40.     <?php static $count3 = 0; if ($count3 == "3") { break; } else { ?>
  41.     <div id="post">
  42.     <a href="<?php the_permalink(); ?>" /><?php the_title(); ?></a>
  43.     </div>
  44.     <?php $count3++; } ?>
  45.     <?php endforeach; ?>    
  46.     </div>
  47.    
  48. </div>
  49.  
  50. <?php else : ?>
  51.  
  52. <?php get_template_part( 'erro' ); ?>
  53.  
  54. <?php endif; ?><br />
  55.  
  56. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement