Show all wp_get_post_terms slugs
Question
I am using the following code to display my custom taxonomy slugs. However it is only displaying the first category and not all the related categories. I know this is fairly simple and is to do with [0] but I can’t figure out how to change it.
$getslugid = wp_get_post_terms( $post->ID, 'opd_taggallery' );
$getslug = $getslugid [0]->slug;
echo $getslug;
0
slug, terms
8 months
0 Answers
84 views
0
Leave an answer
You must login or register to add a new answer .