Advertisement
Guest User

index.php

a guest
Jun 14th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div id="container">
  3. <?php get_sidebar(); ?>
  4. <div id="content">
  5. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  6. <div class="post">
  7. <div class="header">
  8. <h1><?php the_date(); ?></h2>
  9. <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
  10. <?php
  11. $attachments = attachments_get_attachments();
  12. $total_attachments = count($attachments);
  13. ?>
  14. <?php if( $total_attachments > 0 ) : ?>
  15. <ul class="attachments">
  16. <h3>Attachments:</h3>
  17. <?php for ($i=0; $i < $total_attachments; $i++) : ?>
  18. <li>
  19. <a href="<?php echo $attachments[$i]['location']; ?>"><?php echo $attachments[$i]['title']; ?></a>
  20. </li>
  21. <?php endfor ?>
  22. </ul>
  23. <?php endif ?>
  24. </div>
  25. <div class="content">
  26. <?php the_content(); ?>
  27. </div>
  28. <div class="footer">
  29. <p class="category">
  30. Categories: <?php the_category(', '); ?>
  31. </p>
  32. <?php if (is_user_logged_in()) : ?>
  33. <ul class="admin">
  34. <?php edit_post_link(); ?>
  35. </ul>
  36. <?php endif; ?>
  37. </div>
  38. </div>
  39. <?php endwhile; else: ?>
  40. <!-- No posts in query. -->
  41. <?php endif; ?>
  42. </div>
  43. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement