Hey guys,
I'm trying to make the pages on my wordpress site pull in the posts from individual categories. I'm using the pages as my navigation scheme.
So for example on my local events page, I want the most current posts from my local events category to load there. So that ALL my posts appear on the homepage, but the individual categories appear in a dedicated page. i know word press has categories built in to sort out content, but I'd like to have it work a little differently for navigation purposes.
What I've managed to do so far is have a permalink show up on the pages using the following code:
<?php
if (is_page()) {
$cat=get_cat_ID($post->post_title); //use page title to get a category ID
$posts = get_posts ("cat=$cat&showposts=5");
if ($posts) {
foreach ($posts as $post):
setup_postdata($post); ?>
" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h2>
<?php endforeach;
}
}
?>
what i want to have happen, is have the posts appear on pages the same way it does on my homepage (sorted by category of course). Essentially, each page would have a corresponding category with the same name.
the URL for my blog is http://www.RUNGOV.org
Thanks guys