WP Manifestindependent plugin directory
manifest / content / wp-subtitle-3000

Subtitle 3000

Add a subtitle input field to the post edit screen.

★ 0stars
v1.0.0latest · 9 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/barryceelen/wp-subtitle-3000/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

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 )
    ); 
}

Releases

1 release.

Tag
Published
v1.0.0 latest
Aug 11, 2017 9 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.