Using Custom Fields in Titles and Descriptions

Do you use custom fields and want to incorporate them in your SEO titles and descriptions, or Facebook and Twitter titles and descriptions?

This article will walk you through the steps you need to follow.

Tutorial Video

Using Custom Fields in the SEO Titles and Descriptions of Any Content Type

Let's start by looking at how we can use custom fields in the SEO titles and descriptions for a specific content type.

To get started, click on Search Appearance in the All in One SEO menu.

Click on the Content Types and scroll down to the content type you want to use custom fields with. In this example we're going to use Posts.

Posts settings under Search Appearance

In the Post Title or Meta Description field, type the hash character ( # ) in the field to display a list of available tags you can choose from, or click the View all tags link. Then in the Search field, type “custom” and click on the result for Custom Field.

Using the Custom Field smart tag in the Post Title field

You'll see that a new Enter a custom field name box appears, type the name of your custom field in this box and hit Enter. The name of your custom field is case sensitive, so make sure to type it so that the case matches.

Finally, click the Save Changes button at the top or bottom of the screen.

Great! The value of your custom field will now be used in the SEO Title or Meta Description for your content in that post type.

You can use the Custom Field smart tag in the Title and Meta Description fields on the Content Types, Taxonomies, or Media tabs as well as in the Home Page section on the Global Settings tab.

Using Custom Fields for Individual Content

Not only can you use the Custom Field smart tag globally for all content in a post type or taxonomy, but you can also use it on individual content. In this example we're going to do this for a specific page.

To get started, edit the page where you want to use your custom field and scroll down to the AIOSEO Settings section.

In the Page Title or Meta Description field, type the hash character ( # ) in the field to display a list of available tags you can choose from, or click the View all tags link. Then in the Search field, type “custom” and click on the result for Custom Field.

Using the Custom Field smart tag in the Page Title field

You'll see that a new Enter a custom field name box appears, type the name of your custom field in this box and hit Enter. The name of your custom field is case sensitive, so make sure to type it so that the case matches.

Finally, click the Update button at the top of the screen to save your page.

You can use the Custom Field smart tag in the Facebook Title and Facebook Description fields and the Twitter Title and Twitter Description fields as well.

In fact, you can use the Custom Field smart tag in any field where it appears in the list of available smart tags, making it a very versatile way to customize your SEO, Facebook and Twitter meta data.

All in One SEO supports the use of custom fields in SEO titles and descriptions.

To use a custom field in your SEO titles, all you have to do is enter the following string into the appropriate Title Format field under All in One SEO > General Settings > Title Settings:

%cf_fieldname%

Make sure you replace fieldname with the name of your custom field.  For example, if you have a custom field called Color then the string would be %cf_Color% (note, this is case sensitive).

You can also use this string in the Title and Description fields in the All in One SEO box on the Edit Post screen.  Simply enter the string in the Title or Description field and the contents of that custom field will be used.

Using custom fields in All in One SEO

You can use this with any post type that supports custom fields.

Not only does this work with the custom fields within WordPress, it also integrates with the custom fields from popular plugins such as Advanced Custom Fields, PODS and Toolkit.