Skip to content
🎉

Cyber Sale Blowout! Get 50% OFF — Limited Time Only!

Click to Save 50% (opens in a new tab)

Showing Custom Post Data in Dynamic Templates

In this article

    Dynamic Templates are useful because they let you create a reusable layout for multiple posts. You can then update the design in one place, and it applies everywhere. These templates display dynamic information from each post, such as the title, content, featured image, categories, and tags.

    If you want to display custom or unique information for individual posts, that is where Custom Fields become essential.

    WordPress custom fields allow you to store specific data for a post, similar to the options in the Theme Settings metabox. This data can be displayed on the front end using third party plugins or the built in Total Custom Fields module.

    Basic Example Using WP Custom Fields

    A simple example of displaying custom data for a post might look like this:

    Step 1: Add a new custom field to your post. In this example, we created a field named “email_address” and gave it the value “email@somewhere.com”.

    Step 2: Add the exclusive Total “Custom Field” element to your dynamic template, then enter the name of the custom field whose value you want to display.

    Result: If the post contains a custom field with the same name you entered in the Custom Field module, the value will appear on the post that uses the dynamic template.

    WordPress Custom Fields Interface Is Limited

    The WordPress custom fields feature is very powerful, but it is not very user-friendly. You must remember the exact field names, and it only allows plain text values. For a better workflow, we highly recommend using a plugin such as Advanced Custom Fields or the theme’s meta class. This lets you create custom forms in the post editor with the specific fields you need for each post. See more below.

    Display Custom Fields in Other Elements

    Many Total elements also support displaying custom fields directly. For example, the Heading element allows you to select a custom field as the Text Source. See below:

    For elements that do not support native custom field display, you can use the theme’s cf_value shortcode or the cf dynamic variable inside any text field. Below is an example of how you might display a custom field value for a Milestone number.

    Recommended Plugins

    • Advanced Custom Fields – – This plugin lets you register custom fields for any post type using an intuitive and user-friendly interface. Unlike the default WordPress custom field box, which requires you to remember field names, ACF provides actual forms that you can fill out, making it much easier to manage and use your custom fields.
    • Post Types Unlimited – This plugin was designed to work seamlessly with Total, allowing you to easily add custom post types to your site. You can fully customize how they function and how they are displayed within the theme.
    Related Articles
    Back To Top