Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The template for displaying Category Archive pages.
- *
- * @package WordPress
- * @subpackage Twenty_Ten
- * @since Twenty Ten 1.0
- */
- get_header(); ?>
- <div id="container">
- <div id="content" role="main">
- <h1 class="page-title"><?php
- printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );?></h1>
- <?php while ( have_posts() ) : the_post();
- if(!is_category('post-category')) {
- if(is_category('landscape-2')) { ?>
- <?php
- $args = array(
- 'post_type' => 'attachment',
- 'numberposts' => -1,
- 'post_status' => null,
- 'post_parent' => $post->ID,
- 'cat' => 15
- );
- }
- if(is_category('botanical-2')) {
- $args = array(
- 'post_type' => 'attachment',
- 'numberposts' => -1,
- 'post_status' => null,
- 'post_parent' => $post->ID,
- 'cat' => 14
- );
- }
- $attachments = get_posts($args);
- if ($attachments) {
- foreach ( $attachments as $attachment ) {
- echo apply_filters(
- 'the_title' , $attachment->post_title );
- echo '</br>';
- the_attachment_link( $attachment->ID , false );
- ?>
- <p>From the entry:
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
- </br>
- By:
- <?php the_author_posts_link();?></p>
- </br>
- <?php
- }
- }
- }
- ?>
- <?php endwhile;?>
- <?php if(is_category('post-category')) {
- get_template_part( 'loop', 'category' );
- }?>
- </div><!-- #content -->
- </div><!-- #container -->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement