Advertisement
juliebmack

Untitled

Sep 14th, 2011
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Archives
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7. <?php get_header(); ?>
  8. <div id="body">
  9. <div id="main_content">
  10. <div id="post-<?php the_ID(); ?>" <?php post_class('entry');?>>
  11. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  12. <h1 class="entry_title">
  13. <?php the_title(); ?>
  14. </h1>
  15. <?php
  16. $subtitle = get_post_meta($post->ID, 'subtitle', true);
  17. if ($subtitle !== '') {
  18. echo '<p class="subtitle">' . $subtitle . '</p>';
  19. } ?>
  20.  
  21. <?php
  22. // If there is a video, display it
  23. gab_media(array(
  24. 'name' => 'fatured',
  25. 'enable_video' => 'true',
  26. 'video_id' => 'post',
  27. 'catch_image' => 'false',
  28. 'enable_thumb' => 'false',
  29. 'media_width' => '640',
  30. 'media_height' => '350',
  31. 'thumb_align' => 'aligncenter darkborder',
  32. 'enable_default' => 'false',
  33. ));
  34.  
  35. // Display content
  36. the_content();
  37.  
  38. // make sure any floated content gets cleared
  39. echo '<div class="clear"></div>';
  40.  
  41. // Display pagination
  42. wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink= %');
  43.  
  44. // Display edit post link to site admin
  45. edit_post_link(__('Edit This Post','journey'),'<p>','</p>');
  46.  
  47. endwhile; else : endif;
  48.  
  49. // This is where loop for archives list starts
  50. $cats = get_categories();
  51. foreach ($cats as $cat) {
  52. query_posts('cat='.$cat->cat_ID);
  53. ?>
  54. <div class="widget">
  55. <h3><?php echo $cat->cat_name; ?></h3>
  56. <ul>
  57. <?php while (have_posts()) : the_post(); ?>
  58. <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> - (<?php echo $post->comment_count ?>)</li>
  59. <?php endwhile; ?>
  60. </ul>
  61. </div>
  62. <?php } ?>
  63.  
  64. <h3><?php _e( 'Media Gallery Entries', 'journey' ); ?></h3>
  65. <?php
  66. // This is where loop for archives list starts
  67. query_posts('post_type=gab_gallery&showposts=999');
  68. ?>
  69. <div class="widget">
  70. <ul>
  71. <?php while (have_posts()) : the_post(); ?>
  72. <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> - (<?php echo $post->comment_count ?>)</li>
  73. <?php endwhile; ?>
  74. </ul>
  75. </div>
  76. <?php
  77. edit_post_link(__('Edit This Post','journey'),'<p>','</p>');
  78. ?>
  79. </div><!-- .entry -->
  80. </div><!-- /main_content -->
  81.  
  82. <div id="sidebar">
  83. <?php get_sidebar(); ?>
  84. </div><!-- /sidebar -->
  85.  
  86. <?php include (TEMPLATEPATH . '/subnews.php'); ?>
  87.  
  88. </div><!-- /body -->
  89. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement