How to add custom template field

The first way to display your custom field information is to add Advanced Custom Fields’ PHP functions directly to your child theme’s template files.

This is a little advanced because it requires you to dig into your theme’s template files, but it ensures that your custom fields will automatically display in the same spot every time.

Specifically, you’ll need to edit the single template for the post type in question.

For a regular blog post, this is single.php. Or, some themes break things up into template parts. For example, for the TwentyNineteen theme, you actually need to edit the content-single.php template part.

If you’re feeling lost here, you might want to use a different method.

Once you’ve found the theme template file for your single post, you can use Advanced Custom Fields’ the_field() function to display a field’s information. For example,

Leave a Reply

Shopping cart

0
image/svg+xml

No products in the cart.

Continue Shopping
Select your currency