wp_list_categories shows list 3 times
-
I’m using WordPress to build a fanfiction archive. I’m trying to set things up so that when you click on a parent category (e.g. “by Story Title”) the page produced is a list of the child categories for that parent rather than a list of the posts in the children.
I’ve created a category-8.php template for my category with an ID of 8, so that I can test it on one page before I do anything more fiddly. I’m using the ‘Connections’ template at the moment. I tried replacing
<?php require('post.php'); ?>
<?php comments_template(); // Get wp-comments.php template ?>
with
<ul>
<?php wp_list_categories('orderby=name&show_count=1 &use_desc_for_title=1&title_li=&child_of=8'); ?>
</ul>
as per the documentation page on wp_list_categories.
It displays the list as I want it to (children of category 8, no title, sorted by name etc) but it puts the list in three times. See screengrab.I’m new to PHP and WordPress, have already looked in the documentation and am confused! What have I missed?
- The topic ‘wp_list_categories shows list 3 times’ is closed to new replies.