Template Tags/single tag title
Материал из WordPress Wiki
Содержание |
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.