Hi Avery1,
Yoast’s SEO uses placeholders that look like this for example:
%%term_title%%
These are predefined values. But you can also use custom post meta values which is where the secondary title is being stored.
Let me give you an example:
If you visit the Dashboard > SEO > Titles & Metas. Let’s say you want to include the secondary title into the SEO title. For that, you have to switch to the tab “Post Types”. The first option is called “File template” and the default value is
%%title%% %%page%% %%sep%% %%sitename%%
If you want to include the secondary title in front of the standard title, you’ll have to insert %%cf__secondary_tite%%
. the cf_
tells SEO to look for a specific post meta. Secondary Title is being stored as a post meta with the name _secondary_title
.
So, completed, the altered file template would look like this:
%%cf__secondary_title%% %%title%% %%page%% %%sep%% %%sitename%%
It’s important that when combining cf_
and _secondary_title
, you’ll need to add two underlines as you can see in the example above.
This works for every post, page or custom post type where a secondary title is being saved.
Please give it a try and let me know if you have any further quesiton. If everything worked out, please conside leaving a quick review on my plugin and rate it. It’d be much appreciated.