can anyone help me split this custom post type into two lists? i'm a novice PHPr but have been left with this code by someone who said it was too complicated...
function listforcontinent($name, $top = false){
// top=true - show name, no columns
// top=false - dont show name, columns
$slugname = sanitize_title($name);
$args = array('tax_query' => array(array(
'taxonomy' => 'jurisdiction_continents',
'field' => 'slug',
'terms' => $slugname)),
'post_type' => 'jurisdiction',
'orderby' => 'title',
'posts_per_page' => 35,
'order' => 'ASC');
$postslist = get_posts( $args );
if ($postslist) {
if($top) echo '<h4>'.$name.'</h4>';
echo '<ul>';
foreach ( $postslist as $post ) {
setup_postdata($post);
echo '<li><a href="'.get_permalink($post->ID).'">'.get_the_title($post->ID)."</a></li>";
}
echo '</ul>';
}else{
if($top) echo '<h4>'.$name.'</h4>';
}
}
any help would be most appreciated, thanks :)