Wordpress - Custom Post Types and Taxonomies
Given this code snippet:
What will this code output if there are two terms 'Fiction' and 'Non-Fiction' assigned to posts?
register_taxonomy('genre', 'post', array('hierarchical' => true));
$terms = get_terms(array('taxonomy' => 'genre', 'hide_empty' => false));
foreach ($terms as $term) {
echo $term->name . ', ';
}What will this code output if there are two terms 'Fiction' and 'Non-Fiction' assigned to posts?
