displaying current category
-
Hey Group,
I am trying to get my H2 to display the name of the category page, i.e., the name from the selected category-“X”.php. I was working from this document:
https://codex.www.ads-software.com/Category_Templatesand I was using this code:
<?php if ( is_category() ) : ?>
<h2 class="header2">
<?php add_filter('category_description', 'wpautop'); ?>
<?php add_filter('category_description', 'wptexturize'); ?>
<?php echo $cache_categories[$cat]->cat_name ?>
<?php echo category_description(); ?>
<?php endif; ?>
</h2>
Any help would be greatly appreciated,
Thanks,
Orion
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘displaying current category’ is closed to new replies.