I am trying to get the category ID printed into an area of my category.php file.
I don't really know what I am doing so I have pieced together this from the codex, so far...
<?php if( is_category(32) || is_category(35)) { ?>
<!-- this actually prints the category onto my page, score, now i need it into the get_posts -->
<?php
foreach((get_posts()) as $category) {
echo $category->cat_ID . ' ';
}
?>
<ul>
<?php
global $post;
$myposts = get_posts('category=32');
foreach($myposts as $post) :
?>
<li><a href="<?php the_permalink(); ?>/"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
<?php } ?>
I would like this statement to be able to get the category ID and put it in the get_posts argument. Where do I go from here?