Created
January 29, 2018 22:06
-
-
Save leanneromak/59fd5dbc43f88c3d34bba11793a8941e to your computer and use it in GitHub Desktop.
WP display categories as list with no link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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