get_categories?

Soldato
Joined
29 Dec 2004
Posts
5,653
Location
Chatham, Kent
I'm setting up a site using Wordpress which will have 2 main sections

The tree will look like this -

- Reviews
- Hardware
- Software
- Games

- Guides
- Hardware
- Software
- Games

Now what i want to do is make a Reviews Page and a Guides page so that it shows these relevant categories on the page.

The code i've tried is giving me back a blank page -

Code:
<?php
/*
Template Name: Reviews
*/
?>
<?php get_header(); ?>
<?php include(TEMPLATEPATH."/sidebar_l.php");?>
<!-- Main Post Content starts from here -->
<div id="content">
			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	<div class="entries">
		<h3 class="heading"><?php the_title(); ?></h3>
		<div class="post">
			<?php the_content(('<div class="more"><strong>Read More...</strong></div>'));?><div>
			  <ul>
<?php get_categories(); ?>
<!--/actions-->
		</ul>
</div>
		</div>
		<!--/post--><?php endwhile; else: ?>
			<?php _e('<div class="entries"><h3 class="heading" align="center">Sorry, No Posts Matched Your Criteria.</h3><div class="cap"></div></div>'); ?>
			<?php endif; ?>
	  <div class="cap">
		</div><!--/cap-->
	</div><!--/Entries-->
</div><!--/Content -->
<!-- Main Post Content Ends here -->
<?php include(TEMPLATEPATH."/sidebar_r.php");?>
		<div class="clear"></div>
	</div><!--/main-->
<?php include(TEMPLATEPATH."/footer.php");?>
	</div><!--wrap news-->
</body>
</html>

Any help, would be greatly appreciated :)

Andy
 
close, but you need wp_list_categories

Ok, that worked, thanks, but is listing -

- Reviews
- Hardware
- Software
- Games

- Guides
- Hardware
- Software
- Games

How do i get it to just list the Reviews tree and then another page for the Guides tree?

Thanks,

Andy
 
Back
Top Bottom