-
Notifications
You must be signed in to change notification settings - Fork 16
Yoast SEO Plugin Support
The plugin allows you to include the subtitle in your Yoast SEO meta titles and descriptions. Similar to the Yoast %%title%%
placeholder which inserts the post title, you can use:
%%wps_subtitle%%
Inserts the post subtitle.
%%wps_subtitle_before_sep%%
Inserts the seperator if a subtitle is set.
Can be overriden by the wps_subtitle_seo_before_sep
filter.
%%wps_subtitle_after_sep%%
Inserts the seperator if a subtitle is set.
Can be overriden by the wps_subtitle_seo_after_sep
filter.
By default the prefered Yoast SEO seperator %%sep%%
is used.
The reason for providing custom wps_subtitle_{position}_sep
placeholders is so that these show only if a subtitle is set and allows you to have a different seperator before and after the subtitle using the wps_subtitle_seo_{position}_sep
filters.
For example, if %%wps_subtitle_before_sep%%
was filtered to be " ,":
%%title%%%%wps_subtitle_before_sep%%%%wps_subtitle%% %%sep%% %%sitename%%
If a subtitle is set would display:
Page Title, Page Subtitle - Site Name
If a subtitle is not set would display:
Page Title - Site Name