Last active
February 6, 2021 00:35
-
-
Save gdnwebmedia/e46dd06552f9e71429348b3071dcc3f9 to your computer and use it in GitHub Desktop.
list the speakers without links
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
<?php | |
/* | |
* Put this in a code block | |
* Replace `custom_post_slug` with the current slug name | |
*/ | |
// list the speakers without links | |
//$terms = wp_get_post_tags( $post->ID ); | |
//For custom taxonomy use this line below | |
global $post; | |
$terms = wp_get_object_terms( $post->ID, 'custom_post_slug' ); | |
foreach( $terms as $term ) | |
$term_names[] = $term->name; | |
echo implode(', ', (array)$term_names); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment