-
Notifications
You must be signed in to change notification settings - Fork 16
get_the_subtitle
Ben Huson edited this page Dec 10, 2015
·
1 revision
Used to get the subtitle value for a specific post.
<?php get_the_subtitle( $post, $before, $after, $echo ); ?>
$post
(int|object) (optional) Post ID or object.
Default: None Uses the current post.
$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
<?php $subtitle = get_the_subtitle( null, '', '', false ); ?>
Set the $subtitle variable to the subtitle of the current post.
<?php $subtitle = get_the_subtitle( 10, '<h3>', '</h3>', false ); ?>
Set the $subtitle variable to the subtitle of post with ID 10 in an H3 tag.