Codex

Template Tags/single tag title

Contents

Description

Displays or returns the tag title for the current page.

Usage

 <?php single_tag_title('prefix''display'); ?> 

Examples

This example displays the text "Currently browsing " followed by the tag title.

<p><?php single_tag_title('Currently browsing '); ?>.</p>
Currently browsing WordPress.


This example assigns the current tag title to the variable $current_tag for use in PHP.

<?php $current_tag = single_tag_title("", false); ?>

Parameters

prefix 
(string) Text to output before the tag title. Defaults to '' (no text).
display 
(boolean) Display the tag's title (TRUE) or return it for use in PHP (FALSE). Defaults to TRUE.

Related

the_tags, get_the_tags, get_the_tag_list, single_tag_title, is_tag, get_tag_link, wp_tag_cloud, wp_generate_tag_cloud,

How to pass parameters to tags with PHP function-style parameters

Go to Template Tag index