While this is a good thing in most cases, what if you don’t want to create a link? Here’s an easy way to do it.
To display the category name without haveing a link to the category archive being automatically created, simply open replace the_category( ) by the following code:
<?php
$category = get_the_category();
echo $category[0]->cat_name;
?>
<?php $category = $wp_query->get_queried_object(); $cat_name = $category->name; ?>
No comments:
Post a Comment