...

View Full Version : Limit number of sub categories to display [WordPress]



FlourishDNA
11-17-2011, 02:08 PM
Hi,

I am using below code to display Subcategory of a active Category. Is there any way to limit the number of subcategory to display and place More link for rest of the subcategories?


<?php
if (is_category()) {
$this_category = get_category($cat);
if (get_category_children($this_category->cat_ID) != "") {
echo "<ul>";
wp_list_categories('orderby=id&show_count=0&title_li=
&use_desc_for_title=1&child_of='.$this_category->cat_ID);
echo "</ul>";
}
}
?>

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum