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 if(is_category('member-entries')) {
 - get_template_part( 'loop', 'category' );
 - }
 - if(!is_category('member-entries')) {
 - if(is_category('media-categories')) { ?>
 - <?php
 - $args = array(
 - 'post_type' => 'attachment',
 - 'numberposts' => -1,
 - 'post_status' => null,
 - 'post_parent' => $post->ID,
 - 'cat' => 17
 - );
 - }
 - 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 "<div class='post_class'>\n";
 - // Start one post
 - $author_id=$attachment->post_author;
 - echo '</br>';
 - echo apply_filters(
 - 'the_title' , $attachment->post_title );
 - echo '</br>';
 - the_attachment_link( $attachment->ID , false );?>
 - </br>
 - <?php
 - $curuser = get_userdata($author_id);
 - $author_post_url=get_author_posts_url($curuser->ID, $curuser->nicename);
 - echo ' by <a href="' . $author_post_url . '" title="' . sprintf( __( "Posts by %s" ), $curuser->display_name ) . '" ' . '>' . $curuser->display_name.'</a>';?>
 - <p>
 - From the entry:
 - <a href="<?php echo get_permalink($attachment->post_parent); ?>"><?php echo get_the_title($attachment->post_parent); ?></a>
 - </p>
 - </div><!-- End of post_class -->
 - <?php } ?>
 - <?php } ?>
 - <?php } ?>
 - </div><!-- #content -->
 - </div><!-- #container -->
 - <?php get_sidebar(); ?>
 - <?php get_footer(); ?>
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment