Title: Simple Subtitles
Author: Jonathan Desrosiers
Published: <strong>2016 年 4 月 11 日</strong>
Last modified: 2016 年 5 月 10 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/simple-subtitles.svg)

# Simple Subtitles

 作者：[Jonathan Desrosiers](https://profiles.wordpress.org/desrosj/)

[下载](https://downloads.wordpress.org/plugin/simple-subtitles.2.1.1.zip)

 * [详情](https://cn.wordpress.org/plugins/simple-subtitles/#description)
 * [评价](https://cn.wordpress.org/plugins/simple-subtitles/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/simple-subtitles/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/simple-subtitles/#developers)

 [支持](https://wordpress.org/support/plugin/simple-subtitles/)

## 描述

Simple subtitles adds a field on posts, pages, or custom post types for adding a
subtitle. Post types can be enabled/disabled in the writing settings section.

There are several functions in the plugin that allow you to easily get subtitles
for different contexts. These functions mirror the functions in core for titles.

#### If you want to display the subtitle in your theme on your own, use the following filter:

    ```
    <?php
        function mytheme_disable_subtitle_display( $show ) {
            return false;
        }
        add_filter( 'simple_subtitle_auto', 'mytheme_disable_subtitle_display' );
    ?>
    ```

#### By default, only tags are allowed in subtitles (with only class and style attributes). There is a filter this.

    ```
    <?php
        function mytheme_simple_subtitle_allowed_html( $allowed ) {
            $allowed['strong'] = array();
            $allowed['div'] = array(
                'class' => true,
            );

            return $allowed;
        }
        add_filter( 'simple_subtitle_allowed_html', 'mytheme_simple_subtitle_allowed_html' );

    ?>
    ```

For more info on this, read into [the wp_kses functions](https://codex.wordpress.org/Function_Reference/wp_kses).

#### Get the subtitle.

    ```
    <?php $subtitle = get_the_simple_subtitle( $post_id ); ?>
    ```

#### Display the current post’s subtitle. Should be used within the loop.

    ```
    <?php $subtitle = the_simple_subtitle( $before = '', $after = '', $echo = true ); ?>
    ```

#### Get the subtitle for use in an HTML attribute.

    ```
    <?php
        $args = array(
            'before' => '',
            'after' =>  '',
            'echo' => true
        );
        $subtitle = the_simple_subtitle_attribute( $args );
    ?><h3>Roadmap</h3>
    ```

* Add a column in the admin showing subtitles.
 * Add a setting for selecting the
subtitle HTML tag.

## 屏幕截图

 * [[
 * Simple Subtitles on the edit screen.
 * [[
 * Default Simple Subtitle display on the front end.

## 安装

 1. Upload the plugin files to the `/wp-content/plugins/simple-subtitles` directory,
    or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress
 3. Use the Settings->Writing screen to configure enable subtitles for post types. 
    Pages will be enabled by default.

## 常见问题

  Why is this empty?

No one has asked us any questions yet! Use the support link to tell us what is on
your mind.

## 评价

![](https://secure.gravatar.com/avatar/be43c6fca2d17c3e5cb1a4425fb67e31a17d8440f082ddb8b7c17e4b291051eb?
s=60&d=retro&r=g)

### 󠀁[Great](https://wordpress.org/support/topic/great-5464/)󠁿

 [sadatia](https://profiles.wordpress.org/sadatia/) 2017 年 1 月 29 日

Its working

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/simple-subtitles/reviews/)

## 贡献者及开发者

「Simple Subtitles」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Jonathan Desrosiers ](https://profiles.wordpress.org/desrosj/)
 *   [ Linchpin ](https://profiles.wordpress.org/linchpin_agency/)
 *   [ Aaron Ware ](https://profiles.wordpress.org/aware/)

[帮助将「Simple Subtitles」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/simple-subtitles)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/simple-subtitles/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/simple-subtitles/)，或通过[RSS](https://plugins.trac.wordpress.org/log/simple-subtitles/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/simple-subtitles/)。

## 更新日志

#### 2.1.1

 * Fix bug where the automatic display of simple subtitles could not be turned off
   via filter.

#### 2.1

 * Added upgrade class for processing any upgrades that happen.
 * Upgrade all meta keys on sites using an old install of the plugin.

#### 2.0

 * Hello world! Subtitles for all.

## 额外信息

 *  版本 **2.1.1**
 *  最后更新：**10 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 3.5 或更高版本 **
 *  已测试的最高版本为 **4.5.33**
 *  语言
 * [English (US)](https://wordpress.org/plugins/simple-subtitles/)
 * 标签
 * [subtitles](https://cn.wordpress.org/plugins/tags/subtitles/)
 *  [高级视图](https://cn.wordpress.org/plugins/simple-subtitles/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/simple-subtitles/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/simple-subtitles/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/simple-subtitles/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/simple-subtitles/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/simple-subtitles/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/simple-subtitles/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/simple-subtitles/reviews/)

## 贡献者

 *   [ Jonathan Desrosiers ](https://profiles.wordpress.org/desrosj/)
 *   [ Linchpin ](https://profiles.wordpress.org/linchpin_agency/)
 *   [ Aaron Ware ](https://profiles.wordpress.org/aware/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/simple-subtitles/)