Thread Starter
gbaka
(@gbaka)
<?php
$categories = get_categories();
foreach ($categories as $cat) {
if ($cat->category_parent != 0) {
echo '<span style="padding-left:10px;">';
}
echo '<a href="'.get_option('home').get_option('category_base').'/'.$cat->category_nicename.'/">'.$cat->cat_name.'</a> ('.$cat->category_count.')';
if ($cat->category_description != '') {
echo ' - '.$cat->category_description;
}
if ($cat->category_parent != 0) {
echo '</span>';
}
echo '<br />';
}
?>
I’m using this code to get the category list how woul i limit the amount shown per page?
Thread Starter
gbaka
(@gbaka)
I get a weird error when i place the code in, either it doesn’t work or I don’t know how to use it probably the ladder tho…
Thread Starter
gbaka
(@gbaka)
this is for limiting number categories per page on a category list page if the title doesn’t convey the message well enough…