
WordPress 添加页面
Have you ever felt that you need a subtitle for your posts and pages? Recently in one of our projects, 主题实验室, we needed to add subtitles to some of our pages. We felt that others might need it as well, so in this article we will show you how to add a secondary alternative title or subtitle in WordPress posts and pages.
您是否曾经觉得自己的帖子和页面需要字幕? 最近,在我们的一个项目主题实验室 ,我们需要在某些页面中添加字幕。 我们认为其他人也可能需要它,因此在本文中,我们将向您展示如何在WordPress帖子和页面中添加辅助标题或副标题。
ThemeLab 网站上的现场演示:
ThemeLab 网站上的现场演示如下:
影片教学 (Video Tutorial)
如果您不喜欢该视频或需要更多说明,请继续阅读。
如果您不喜欢该视频或需要更多说明,请继续阅读。
First thing you need to do is install and activate the 次要头衔 plugin. Upon activation, you will automatically see an additional title field below your main title on your post edit screen.
您需要做的第一件事是安装并激活次要头衔插件。 激活后,您将在帖子编辑屏幕上的主标题下方自动看到一个附加标题字段。

Don’t worry if you only want to use it on pages or another 自定义帖子类型. The plugin comes with its own configuration options which allow you to fine tune how the secondary titles are displayed in the admin area and in your WordPress themes.
如果您只想在页面或其他自定义帖子类型上使用它,请不要担心。 该插件带有其自己的配置选项,使您可以微调辅助标题在管理区域和WordPress主题中的显示方式。
If you want to change those options, then you need to click on 设置 » 次要标题 menu in the WordPress admin menu.
如果要更改这些选项,则需要单击WordPress管理菜单中的设置 » 次要标题菜单。

在设置屏幕上,您可以选择要显示辅助标题的帖子类型、类别和/或特定帖子 ID。您还可以选择帖子编辑器屏幕上输入框的位置。这将允许您在主帖子标题框上方或下方显示辅助标题框。
在设置屏幕上,您可以选择要显示辅助标题的帖子类型、类别和/或特定帖子 ID。您还可以选择帖子编辑器屏幕上输入框的位置。这将允许您在主帖子标题框上方或下方显示辅助标题框。
By default the plugin will automatically display secondary titles however you can stop this by choosing 不 next to 自动插入 option.
默认情况下,该插件将自动显示辅助标题,但是您可以通过选择” 自动插入”选项旁边的“ 不”来停止显示辅助标题。
You can manually display secondary titles in your theme by using <?php get_secondary_title(); ?>
模板标签 in your theme files. This will give you maximum control over style.
您可以使用<?php get_secondary_title(); ?>
在主题中手动显示辅助标题<?php get_secondary_title(); ?>
<?php get_secondary_title(); ?>
主题文件中的模板标签 。 这将使您最大程度地控制样式。
默认格式在帖子标题旁边显示辅助标题,并用冒号分隔,如下所示:
默认格式在帖子标题旁边显示辅助标题,用冒号分隔,如下所示:
The Post Title: The Secondary Title
The Post Title: The Secondary Title
You can change this by specifying your own format in the标题格式 option on the plugin’s settings screen.
您可以通过在插件的设置屏幕上的标题格式选项中指定自己的格式来更改此设置。

这就是默认的“二十十三”主题的样子。
这就是默认的二十三十三主题的样子。

We hope this article helped you add alternate secondary title or subtitle to posts and pages in WordPress. We also have a tutorial on how to 隐藏选择性 WordPress 帖子和页面的标题 should you need to do that.
我们希望本文能帮助您为WordPress中的帖子和页面添加辅助标题或副标题。 如果您需要这样做,我们还将提供有关如何隐藏选择性 WordPress 帖子和页面标题的教程。
If you liked this article, then please subscribe to our YouTube 频道 for more WordPress video tutorials. You can also join us on 推特 and 谷歌+.
如果您喜欢这篇文章,请订阅我们的YouTube 频道,以获取更多WordPress视频教程。 您也可以通过推特和谷歌+加入我们。
翻译自: https://www.wpbeginner.com/plugins/how-to-add-subtitle-for-posts-and-pages-in-wordpress/
WordPress 添加页面