View difference between Paste ID: seSL8wyc and NEu7yvaj
SHOW: | | - or go back to the newest paste.
1
<?php
2
/** 
3
* Template Name: Category Page 
4
* A custom page template Page Name = Category Name .
5
*/
6
7
/**
8
 * @package WordPress
9
 * @subpackage Coraline
10
 * @since Coraline 1.0
11
 */
12
13
get_header(); ?>
14
15
		<div id="content-container">
16
			<div id="content" role="main">
17
18
			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
19
20
				<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
21
					<?php if ( is_front_page() ) { ?>
22
						<h2 class="entry-title"><?php the_title(); ?></h2>
23
					<?php } else { ?>
24
						<h1 class="entry-title"><?php the_title(); ?></h1>
25
					<?php } ?>
26
27
					<div class="entry-content">
28
						<?php the_content(); ?>
29
						<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'coraline' ), 'after' => '</div>' ) ); ?>
30
						<?php edit_post_link( __( 'Edit', 'coraline' ), '<span class="edit-link">', '</span>' ); ?>
31
					</div><!-- .entry-content -->
32
					
33-
				<?php
33+
34
			
35
			</div><!-- #post-## -->
36
			
37
			<div id="post-<?php the_ID(); ?>-2">
38
				
39
			<?php
40
					global $post;   
41
					$tmp_post = $post;   
42
					//Create a query for the category   
43
					$pageslug = $post->post_name;
44
					$args = array(
45-
					get_template_part( 'loop', 'titles' );   
45+
46
						'category_name' => $slug,
47
						'paged' => $paged
48
					);
49
					query_posts( $args );
50
					//Get the lines   
51-
	
51+
					get_template_part( 'loop', 'title' );   
52
					//Reset our page to get the comments   
53
					$post = $tmp_post;
54
				?>
55
				
56
				<?php comments_template( '', true ); ?>
57
58
				</div><!-- #post-## -->
59
				
60
			</div><!-- #content -->
61
		</div><!-- #content-container -->
62
63
<?php get_sidebar(); ?>
64
<?php get_footer(); ?>