Function: single_term_title

single_term_title( string $prefix, boolean $display )

Display or retrieve page title for taxonomy term archive.

Shortcut: stt

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

Useful for taxonomy term template files for displaying the taxonomy term page title. The prefix does not automatically place a space between the prefix, so if there should be a space, the parameter value will need to have it at the end.

Parameters

Name Type(s) Default Value Description
$prefix string ''

Optional. What to display before the title.

$display boolean true

Optional, default is true. Whether to display or retrieve title.

Returns

string | void

Title when retrieving.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.