luquiyahni

index.php

Apr 19th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.43 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div id="contentWrap">
  3.    <?php $firstClass = 'firstpost';
  4. if (have_posts()) :
  5.    while (have_posts()) : the_post(); ?>
  6.  
  7.       <!-- post -->
  8.       <div id="<?php echo $firstClass; ?>">
  9.       <?php if ($firstClass == 'firstpost') : ?>
  10.          <?php $firstClass = 'post'; ?>
  11.                 <div class="meta">
  12.                      <?php the_time('d/m/Y') ?>
  13.                     </div>
  14.                     <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
  15.                     <div class="entry">
  16.                     <?php if ( has_post_thumbnail() ) {
  17.                             the_post_thumbnail('medium');
  18.                             }
  19.                         the_excerpt(); ?>
  20.                     </div>
  21.       <?php else : ?>
  22.                 <div class="meta">
  23.                      <?php the_time('d/m/Y') ?>
  24.                     </div>
  25.                     <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
  26.                     <div class="entry">
  27.                     <?php if ( has_post_thumbnail() ) {
  28.                             the_post_thumbnail('thumbnail');
  29.                             }
  30.                         the_excerpt(); ?>
  31.                     </div>
  32.       <?php endif; ?>
  33.    <?php endwhile; ?>
  34.       <!-- code here for after loop -->
  35. <?php else : ?>
  36.    <!-- code here for no posts found -->
  37. <?php endif; ?>
  38.  
  39. </div> <!-- end contentWrap -->
  40. <?php include("sidebar.php"); ?>
  41.  
  42. <?php include("sidebar2.php"); ?>
  43.  
  44. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment