<?php get_header(); ?>
<div id="pagecontent">
<div id="crenav">
<?php $wpgleftposts = new WP_Query('category_name=credits&orderby=id&order=asc&posts_per_page=1'); ?>
<?php while ($wpgleftposts->have_posts()) : $wpgleftposts->the_post(); ?>
<?php $curpid = $post->ID; ?>
<?php endwhile; ?>
<?php
$parentCatName = single_cat_title('',false);
$parentCatID = get_cat_ID($parentCatName);
$childCats = get_categories( 'child_of='.$parentCatID );
if(is_array($childCats)):
foreach($childCats as $child){ ?>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" <?php if ($curpid == $post->ID){echo 'class = "current"';} ?> title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo $child->name; ?></a></h1>
<?php }
endif;
?>
</div>
<div id="crepost">
<?php if (have_posts()) : ?>
<?php query_posts( array(
'cat' => '9',
'orderby' => 'id',
'order' => 'asc',
'paged' => ( get_query_var('page') ? get_query_var('page') : 1 ),
));
?>
<?php //$creloop = new WP_Query('category_name=credits&orderby=id&order=asc&paged=$paged'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="crepostbox">
<div class="crebcon"><h1><?php the_title(); ?></h1></div>
<?php the_post_thumbnail('full'); ?>
</div>
<?php endwhile; ?>
<?php kriesi_pagination();
?>
<?php endif; ?>
</div>
</div>
<?php get_footer(); ?>