I'm need some help with wordpress and getting categories setup for pages, currently I have the code below within my index.php, I created a new page and assigened it a custom temple but nothing happend, since I was using posts I had to modify the code within index.php to get the desired results.
I want to display the name of the category as the title, however when i run the code right below, i get the titles of the posts now, instead i want to display category they are in so the latest one would be called 'News 2011', how do I do that?
<?php while(have_posts()) : the_post(); ?>
<?php the_content('title'); ?>
<?php endwhile; ?>
Also looking at the code within div id sidebar-menu, I want to display the categories I have created which are links, so once a user clicks on that link it takes you to the page with the posts displayed for that category, how do I achieve this?
* Template Name: News Releases
<?php get_header(); ?>
<?php wp_list_pages('depth=1&title_li=&sort_column=menu_order'); // display the sub-pages of the current parent page ?>
<h3>News Releases</h3> <-Display Category title NOT post title
<?php query_posts('category_name=news2011'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php /* the_ID(); */ ?>
<?php /* the_date('F Y'); */ ?>
<li><?php the_content(); ?></li>
<?php endwhile; endif; ?>
<?php get_footer(); ?>