Skip to content

Instantly share code, notes, and snippets.

@hmbashar
Created October 6, 2019 15:16
Show Gist options
  • Save hmbashar/cbc27c14a67e3d5e841b66a4f359a0e7 to your computer and use it in GitHub Desktop.
Save hmbashar/cbc27c14a67e3d5e841b66a4f359a0e7 to your computer and use it in GitHub Desktop.
Show cuxtom taxonomy in the single page for cusotm post type
<?php
$cb_faq_cat = get_the_terms(get_the_ID(), 'cb_faq_cat');
if(is_array($cb_faq_cat)) {
foreach ($cb_faq_cat as $cb_cat) {
echo esc_html($cb_cat->name);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment