Skip to content
Ben Huson edited this page Dec 10, 2015 · 1 revision

Used to output the subtitle within a post loop in a template. Outputs an empty string if no subtitle set.

Usage

<?php the_subtitle( $before, $after, $echo ); ?>

Parameters

$before
(string) (optional) Text to place before the subtitle.
Default: None

$after
(string) (optional) Text to place after the subtitle.
Default: None

$echo
(boolean) (optional) Display the subtitle (TRUE) or return it for use in PHP (FALSE).
Default: TRUE

Example

<?php the_subtitle( '<h2>', '</h2>' ); ?>

Displays the subtitle in an H2 tag.