Subtitle 3000
Add a subtitle input field to the post edit screen.
by Barry Ceelen · github.com/barryceelen/wp-subtitle-3000 · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/barryceelen/wp-subtitle-3000/archive/refs/heads/master.zipDeclares an update source (https://github.com/barryceelen/wp-subtitle-3000), so updates arrive through the plugin's own updater.
Readme
WordPress Subtitle Plugin
Add a subtitle input field to the post edit screen.
Register your custom post types with 'subtitle' support or add post type support via a filter:
add_action( 'init', 'prefix_add_subtitle_support' );
/**
* Add a subtitle input field to the post and page admin screen.
*/
function prefix_add_subtitle_support() {
$post_types = array( 'post', 'page' );
foreach( $post_types as $post_type ) {
add_post_type_support( $post_type, 'subtitle' );
}
}
Use
The subtitle is saved to a custom field called subtitle.
The plugin does not add any template tags to retrieve it, use at your own convenience.
// When in the loop something along these lines might work:
if ( ! empty( $post->subtitle ) ) {
echo esc_html( $post->subtitle );
}
// Or:
$subtitle = get_post_meta( $post->ID, 'subtitle', true );
if ( ! empty( $post->subtitle ) ) {
printf(
'<p class="entry-subtitle">%s</p>',
esc_html( $post->subtitle )
);
}
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| v1.0.0 | Aug 11, 2017 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.