single_cat_title

CATEGORY TAG

What It Does

Displays either the name of the category or the tags for the current page, depending on your WordPress settings. single_cat_title can only be used outside of The Loop.

Code

<p><?php single_cat_title(‘prefix’, ‘display’); ?> .</p>

The two parameters used with single_cat_title are “prefix” and “display” as shown above.

The prefix is what you want to display before the actual category title is shown. The default is ”, which will display nothing.

Display controls whether or not to display the category title. This is set to TRUE by default.

Example

<p><?php single_cat_title(‘Now viewing ‘); ?>.</p>