finding out an archives category?
Hi. I’d like to list a link of available posts on the top of each archive page. I’m trying to do it with list_cats but I can’t figure out how to pass the list_cats(arguments) a variable with the current category ID. Here’s what I have so far from the CODEX:
$cat = get_the_category(); $cat = $cat;
$posts = get_posts('numberposts=9&offset=1&category=$cat');
foreach($posts as $post) :
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
just getting errors – cause I’m just hacking around, not really understanding the first section. Can anyone help me?
- The topic ‘finding out an archives category?’ is closed to new replies.