WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WP Subtitle

Add subtitles (subheadings) to your pages, posts or custom post types.

The WP Subtitle plugin allows your pages and posts to contain a subtitle. Also called a sub-heading, this this short line of text is meant to appear beneath a post's (or page's) title, but can be inserted in your template wherever you choose.

<?php the_subtitle(); ?>

is used for inside The Loop. If you wish to get a page/post's subtitle outside The Loop, use <?php get_the_subtitle( $post ); ?>, where $post is a post object or ID ($post->ID).

Parameters

Just like WP's built-in <?php the_title(); ?> method, <?php the_subtitle(); ?> tag accepts three parameters:

$before
(string) Text to place before the subtitle. Defaults to "".

$after
(string) Text to place after the subtitle. Defaults to "".

$echo
(boolean) If true, display the subtitle in HTML. If false, return the subtitle for use in PHP. Defaults to true.

Things are slightly different in <?php get_the_subtitle(); ?>:

$post
(int|object) Post, page or custom post type object or ID.

$before
(string) Text to place before the subtitle. Defaults to "".

$after
(string) Text to place after the subtitle. Defaults to "".

$echo
(boolean) If true, display the subtitle in HTML. If false, return the subtitle for use in PHP. Defaults to true.

For full details on the template tags and their arguments, view the documentation here.

Requires: 3.0 or higher
Compatible up to: 3.9.2
Last Updated: 2014-7-2
Downloads: 14,370

Ratings

3 stars
3.8 out of 5 stars

Support

0 of 2 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2
100,1,1
100,1,1
67,3,2
100,1,1
0,2,0
0,1,0
50,2,1
0,1,0
75,4,3
100,2,2
100,1,1
100,1,1
100,1,1
100,1,1
100,2,2
100,2,2
100,1,1
100,1,1
100,2,2
100,1,1
100,1,1
100,1,1
100,1,1