Skip to content

Instantly share code, notes, and snippets.

@leanneromak
Created January 29, 2018 22:06
Show Gist options
  • Save leanneromak/59fd5dbc43f88c3d34bba11793a8941e to your computer and use it in GitHub Desktop.
Save leanneromak/59fd5dbc43f88c3d34bba11793a8941e to your computer and use it in GitHub Desktop.
WP display categories as list with no link
<span class="pp-data"> Category: </span>
<?php $terms = get_the_terms($post->ID, 'category-pp');
$count = count($terms);
if ( $count > 0 ){
foreach ( $terms as $term ) {
echo $term->name;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment