This may be a syntax problem but if so I can't see the problem.
I want to select specific terms of a custom taxonomy and display their names. I'm having a problem with the selection process in the following code.
$taxonomy = 'chapters';
echo("Test Term Display ");
$args1=array(
'include'=> array(74,76
)
);
$chaptertitles=get_terms( 'chapters', $args1 );
$count1 = count($chaptertitles);
echo($count1);
if ( $count1 > 0 ){
echo "<ul>";
foreach ( $chaptertitles as $chaptertitle ) {
echo "<li> Chapter Title:" . $chaptertitle->name . "</li>";
}
echo "</ul>";
}
This returns zero for $count1.
However, if I remove the arguements so that the default conditions apply then I get all the terms returned.
This suggests that my syntax is incorrect for $args1 but I can't see any errors.
I'd appreciate any suggestions on how to get this working.
Thx