Skip to content

Instantly share code, notes, and snippets.

@sabotawsh
Last active August 28, 2019 14:36
Show Gist options
  • Save sabotawsh/464c0e691e7be27be161b487b0ce765c to your computer and use it in GitHub Desktop.
Save sabotawsh/464c0e691e7be27be161b487b0ce765c to your computer and use it in GitHub Desktop.
Removing the link from WordPress categories
// NON CPT
<?php
foreach((get_the_category()) as $category) {
echo $category->cat_name . ' ';
}
?>
// CPT
<?php echo strip_tags( get_the_term_list( $post->ID, 'job_titles', '', ', ') ) ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment