Hi,
I would like to add a list of items in the category “Artists” like the photo enclosed.
How do you do?
This code allows a list of categories
<div class=”filter-slide-wrap span12 alt-bg none” style=”display: block;”>
<ul class=”aux-list aux-categories row clearfix” style=”display: block;”>
`<?php
$taxonomy = ‘portfolio-category’;
$orderby = ‘name’;
$pad_counts = 0; // 1 for yes, 0 for no
$hierarchical = 1; // 1 for yes, 0 for no
$title = ”;
$empty = 0;
$args = array(
‘taxonomy’ => $taxonomy,
‘orderby’ => $orderby,
‘pad_counts’ => $pad_counts,
‘hierarchical’ => $hierarchical,
‘title_li’ => $title,
‘hide_empty’ => $empty
);
?>
<?php $all_categories = get_categories( $args );
print_r($all_categories);
foreach ($all_categories as $cat) {
//print_r($cat);
if($cat->category_parent == 0) {
$category_id = $cat->term_id;
?>
<?php
echo ‘<li class=”cat-item span2″>’;
echo ‘<a href=”‘. get_term_link($cat->slug, ‘portfolio-category’) .'”>’. $cat->name .'</a>’;
echo ‘</li>’;
?>
<?php }
}
?>
</ul>
</div>
</div>`