Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Pete on "How to exclude the current term from all the terms?"

$
0
0

This piece of code is in my custom taxonomy template taxonomy-driver-training-school.php. It displays ALL the terms of the specified taxonomy, but how can I make it exclude the current term?

How do I exclude the current term

<?php
$driver = get_terms('driver-training-school','hide-empty=0&orderby=name&order=asc&exclude=????????');
$sep = '';
foreach ( $driver as $driver ) {
if( ++$count > 999 ) break;
echo $sep . '<a href="'.get_term_link($driver).'">'.$driver->name.'</a>';
$sep = ', ';
}
?>

Viewing all articles
Browse latest Browse all 8245

Trending Articles