Rank Math: How To Use Custom Fields In Your WordPress Page Titles

As I’ve been building out our acronyms on Martech Zone, the inevitable happened when I had a single acronym with multiple definitions. Specifically, PaaS:
At issue here is my page title is a duplicate. Both page titles were:
What is PaaS? | Martech Zone Acronyms
SEO audits with Sitechecker continued to nag me that I had multiple pages with the same title. It’s not anything that could lead to my site being penalized and nor is it a critical issue (despite what many audits say); however, search engines could possibly mistake the page as a duplicate and may ignore one of them… regardless of them having different content on each page.
Rank Math SEO
I’m utilizing Rank Math’s fantastic SEO plugin for WordPress where I can optimize the titles and descriptions of any custom field, and the page title was programmed with the following substitution strings and format to make the title:
What is %title%? %sep% %sitename% Acronyms
- %title% is the title of my post
- %sep% is the separator symbol I’m using throughout the site
- %sitename% is the site name in the site settings
Custom Fields
When I developed the custom post type for the acronyms, it required a title (the acronym), an explanation (post content), and the acronym spelled out. I named this acronym_definition.
Both pages are relevant, so I need to modify the page title to reflect the difference. The easiest means to do this is simply to include the actual acronym definition in the page title. That requires that I include a custom field in the actual page title… which might ordinarily require quite a bit of programming.
Thankfully, Rank Math offers a substitution string customfield
where you insert the name of your custom field and Rank Math will properly populate it. Here’s the new default title tag:
What is %title%? %customfield(acronym_definition)% %sep% %sitename% Acronyms
- %title% is the title of my post
- %customfield(acronym_definition)% is the custom field with the field name in parenthesis
- %sep% is the separator symbol I’m using throughout the site
- %sitename% is the site name in the site settings
Now, for the examples above, I have 2 distinct titles for the pages:
- What is PaaS? Platform as a Service | Martech Zone Acronyms
- What is PaaS? Payment as a Service | Martech Zone Acronyms
Problem solved! And… I really like that the title tag now incorporates the actual acronym definition so that I can possibly rank on related terms. Rank Math also enables you to customize each individual post or page’s title but it’s not something I’m going to do for acronyms.
Sign Up For Rank Math SEO for WordPress
Rank Math is on our recommended list of WordPress plugins that we frequently keep up to date! If you’re using a competitor’s plugin, there’s a great wizard for importing settings. Additionally, the ability to manage redirections and local SEO settings are all incorporated into the plugin.