>
Download This Plugin | |
Download Elegant Themes | |
Name | WP Subtitle |
Version | 2.3.2 |
Author | Husani Oakley, Ben Huson |
Rating | 76 |
Last updated | 2015-02-10 12:10:00 |
Downloads |
21486
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
WP Subtitle plugin added 3 bytes of resources to the Home page and 2 bytes of resources to the sample Post page.
WP Subtitle plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! WP Subtitle plugin ads no tables to your Wordpress blog database.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).
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.
By default, subtitle are supported by both posts and pages. To add support for custom post types use add_post_type_support( 'my_post_type', 'wps_subtitle' ).