Adds a secondary title to posts, pages and custom post types.
Secondary Title is a simple, light-weight plugin that adds an alternative title to posts, pages and/or custom post types which can be displayed automatically, with a shortcode or by using PHP.
The plugin comes with an extra settings page which allows you to customize the plugin according to your needs. You can change:
Please see the official website for a full documentation.
IMPORTANT: If the Auto show option is set to Off, you have to use either
<?php echo get_secondary_title($post_id, $prefix, $suffix); ?>
or
<?php the_secondary_title($post_id, $prefix, $suffix); ?>
in your theme file(s) (e.g. single.php) where you would like the secondary title to be displayed.
For a more detailed documentation with parameters, functions and examples, please see the official documentation.
Secondary Title with activated Auto show function that automatically adds the secondary title to the standard post/page title separated with a line break (<br>
).
Secondary Title with activated Auto show function that automatically adds the secondary title to the standard post/page title with secondary title in bold (<strong>
).
Secondary title input field using Gutenberg editor.
Secondary title input field using Classic Editor plugin (WordPress version below 5.0).
A section of Secondary Title's settings page.
The full FAQ can be found in the documentation.
<input>
for Post IDsPHP fatal error
when using undeclared variables in function parameters (thanks to @philsimon)die()
instead of return
statement to prevent files from being accessed directlyPHP Notice: Trying to get property of non-object on line 471
%secondary_title%
to display.admin/settings.php
to includes/setings.php
due to PHP complications.%secondary_title%
to display./includes/gutenberg-info.php
and the notice saying “Secondary Title doesn’t work anymore”./includes/settings.php
to /admin/settings.php
.secondary_title_get_default_setting()
as deprecated function.secondary_title_columns_in_post_types
. Read more about it in the documentation.screenshot-3.png
with an updated one.[secondary_title allow_html="false" post_id="0"]
$use_settings
parameter to get_secondary_title()
and others which defines whether the secondary title should only be displayed if it matches the plugin’s settings. Default false
.<?php secondary_title_plugins_settings_link(); ?>
due to compatibility problems.secondary_title_show_overview_column
to disable the secondary title column on post overviews without using the screen values (thanks to Alkorr).%title%
and %secondary_title%
variable on settings page in Title format more than once.<?php get_secondary_title(); ?>
, <?php the_secondary_title(); ?>
and<?php get_filtered_post_types(); ?>
to <?php get_secondary_title_filtered_post_types(); ?>
to avoid<?php has_secondary_title(); ?>
function. See the official documentation for more information.<?php get_secondary_title_link($post_id, $values); ?>
and <?php the_secondary_title_link($post_id, $values); ?>
functions$prefix
and $suffix
parameter for <?php get_secondary_title(); ?>
and <?php the_secondary_title(); ?>
.