Google says that code only retrieves categories with posts in them, and only display parent categories.
You can customize wp_list_categories somewhat. See http://codex.ww.wp.xz.cn/Template_Tags/wp_list_categories
I THINK this might do it:
wp_list_categories('orderby=id');
Of course, it depends what ‘5 of 7’ means. If you only want to show parent cats, then add &depth=1 to the params etc etc.
Find the function dp_list_categories in either your theme folder and see if it accepts any of the template tag, wp_list_categories(), arguments.
If you continue this thread, please provide a link to download the theme you are using.
Thanks a lot for the help.
This is the way i solved it:
In the functions.php of my theme i found:
# Displays a list of categories
function dp_list_categories($exclude='') {
if (strlen($exclude)>0) $exclude = '&exclude=' . $exclude;
$categories = get_categories('hide_empty=1'.$exclude);
$first = true; $count = 0;
foreach ($categories as $category) {
$count++; if ($count>5) break; // limit to 5
if ($category->parent<1) {
if ($first) { $first = false; $f = ' class="f"'; } else { $f = ''; }
?><li<?php echo $f; ?>>
<a href="<?php echo get_category_link($category->cat_ID); ?>"><?php echo $category->name ?><?php echo $raquo; ?></a></li>
<?php
}
}
}
And i changed for:
# Displays a list of categories
function dp_list_categories($exclude='') {
if (strlen($exclude)>0) $exclude = '&exclude=' . $exclude;
$categories = get_categories('orderby=ID&hide_empty=1'.$exclude);
$first = true; $count = 0;
foreach ($categories as $category) {
$count++; if ($count>7) break; // limit to 7
if ($category->parent<1) {
if ($first) { $first = false; $f = ' class="f"'; } else { $f = ''; }
?><li<?php echo $f; ?>>
<a href="<?php echo get_category_link($category->cat_ID); ?>"><?php echo $category->name ?><?php echo $raquo; ?></a></li>
<?php
}
}
}
As you can see, i put 7 as the limit and get_categories the orderby=id.
Thanks again!