Settings
The settings page is where you can configure how Secondary Title works. You can access the settings page by navigating to Settings -> Secondary Title.
General Settings
This section sets the general behavior of the plugin.
1. Auto Show
The Auto Show setting tells Secondary Title whether it should automatically merge with the default title of a post.
Available Options
On
: (Default) Post titles will be automatically merged with the secondary title and displayed according to the Title Format settingOff
: Post titles will ignore the Title Format setting and instead display only the default title of the post
2. Title Format
The Title Format setting allows you to change the format your post titles are displayed. A live preview of how your format will look like is shown in the Preview box below. Two placeholders are available to you.
Placeholders
%title%
: The default title of the post%secondary_title%
: The secondary title of the post as entered in the post editor
With the default settings active, the secondary title is displayed before the primary title, separated by a colon (:
) as seen here:
%secondary_title%: %title%
This will show a post with the primary title Hello World!
and the secondary title Welcome
as:
Welcome: Hello World!
To give you the maximum flexibility, it also supports most HTML tags*. This can be used to visually style the output via CSS or wrap parts in any HTML tag. In this example, the secondary title is wrapped in a <span>
tag with a style
attribute to change the color of the secondary title to red:
<span style="color: red;">%secondary_title%</span>: %title%
Output
Welcome: Hello World!
EXAMPLES
For more examples on how you can use the title format, check out the Examples page.
Display Rules
This section allows you to set rules for when the secondary title should be displayed.
1. Only show in main post
When enabled, the merged secondary title will only be displayed on the main post. This is useful when you have a post with a secondary title that you want to display only on the main post and not on the archive or search pages.
Options
On
: The secondary title will only be displayed on the main postOff
: The secondary title will be displayed on all posts
2. Post Types
This setting allows you to select the post types where the secondary title should be displayed. Only post types that have been registered with the $args
key 'public' => true
are available for selection. Internal post types, such as attachment
, cannot be set.
Options
[X]
: (checkbox) Displays the secondary title for posts of the selected post type[ ]
: (checkbox) Does not display the secondary title for posts of the selected post type
SHOW ALL
If you select no post types, the secondary title will be displayed on all post types.
3. Categories
This setting lets you choose which categories a post must be in to display the secondary title, similar to the Post Types setting. If you don't choose any categories, the secondary title will be enabled for all categories.
Options
[X]
: (checkbox) Displays the secondary title for posts in the selected category[ ]
: (checkbox) Does not display the secondary title for posts in the selected category
SHOW ALL
Just like the Post Types setting, if you select no categories, the secondary title will be displayed on all categories.
4. Post IDs
This setting allows you to specify the post ID or IDs of the posts where the secondary title should be displayed. Leaving this field empty will display the secondary title on all posts.
Examples
1990
Displays the secondary title only for the post with the ID 1990
.
1990, 1991, 1992
Displays the secondary title only for the posts with the IDs 1990
, 1991
, and 1992
. Separate multiple IDs with a comma (,
). All other characters, including spaces, will be stripped out.
SHOW ALL
Leave the input field empty to enable the secondary title for all posts.