Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Archives
- */
- ?>
- <?php get_header(); ?>
- <?php get_header(); ?>
- <div id="body">
- <div id="main_content">
- <div id="post-<?php the_ID(); ?>" <?php post_class('entry');?>>
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <h1 class="entry_title">
- <?php the_title(); ?>
- </h1>
- <?php
- $subtitle = get_post_meta($post->ID, 'subtitle', true);
- if ($subtitle !== '') {
- echo '<p class="subtitle">' . $subtitle . '</p>';
- } ?>
- <?php
- // If there is a video, display it
- gab_media(array(
- 'name' => 'fatured',
- 'enable_video' => 'true',
- 'video_id' => 'post',
- 'catch_image' => 'false',
- 'enable_thumb' => 'false',
- 'media_width' => '640',
- 'media_height' => '350',
- 'thumb_align' => 'aligncenter darkborder',
- 'enable_default' => 'false',
- ));
- // Display content
- the_content();
- // make sure any floated content gets cleared
- echo '<div class="clear"></div>';
- // Display pagination
- wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink= %');
- // Display edit post link to site admin
- edit_post_link(__('Edit This Post','journey'),'<p>','</p>');
- endwhile; else : endif;
- // This is where loop for archives list starts
- $cats = get_categories();
- foreach ($cats as $cat) {
- query_posts('cat='.$cat->cat_ID);
- ?>
- <div class="widget">
- <h3><?php echo $cat->cat_name; ?></h3>
- <ul>
- <?php while (have_posts()) : the_post(); ?>
- <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> - (<?php echo $post->comment_count ?>)</li>
- <?php endwhile; ?>
- </ul>
- </div>
- <?php } ?>
- <h3><?php _e( 'Media Gallery Entries', 'journey' ); ?></h3>
- <?php
- // This is where loop for archives list starts
- query_posts('post_type=gab_gallery&showposts=999');
- ?>
- <div class="widget">
- <ul>
- <?php while (have_posts()) : the_post(); ?>
- <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> - (<?php echo $post->comment_count ?>)</li>
- <?php endwhile; ?>
- </ul>
- </div>
- <?php
- edit_post_link(__('Edit This Post','journey'),'<p>','</p>');
- ?>
- </div><!-- .entry -->
- </div><!-- /main_content -->
- <div id="sidebar">
- <?php get_sidebar(); ?>
- </div><!-- /sidebar -->
- <?php include (TEMPLATEPATH . '/subnews.php'); ?>
- </div><!-- /body -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement