I've searched far and wide to try and find an answer to my question. I'm hoping I can get help here. Here goes...
I'm currently retrieving the terms of my custom taxonomy using:
<?php echo get_the_term_list( $post->ID, 'skills', '<ul><li>', '</li><li>', '</li></ul>' ); ?>
What I'm trying to do is retrieve these same post-specific custom taxonomy terms in a list without them being output as links. I've tried all of the following "solutions," but none of them work. Any help would be appreciated.
Returns the post-specific terms in one long string that can't be put in a list:
$terms_as_text = get_the_term_list( $post->ID, 'skills', '<ul><li>', '</li><li>', '</li></ul>' ) ;
echo strip_tags($terms_as_text);
Returns a list of all the terms used across all the custom post types:
<ul>
<?php $args = array( 'taxonomy' => 'skills', 'orderby' => 'ID', 'order' => 'ASC' );
$categories = get_categories( $args );
foreach($categories as $category) { echo '<li> '. $category->name . '</li>'; }
?>
</ul>
Returns nothing:
<?php $args = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
wp_get_object_terms( $post->ID, $skills, $args );
?>
I've even tried get_the_terms
, get_terms
, and get_categories
to no avail.