# Displaying Values in Your Theme

The Advanced Custom Field’s API makes it very easy to display field data in your theme. There are many functions available and all are well documented on the [resources page](https://www.advancedcustomfields.com/resources/#functions).

## The Basics

Once you have [created a field group](https://www.advancedcustomfields.com/resources/getting-started/creating-a-field-group/) and input some data, you can now load and display the data in your theme.

All values are saved as native post\_meta (when saved to a post) and although you can use the native WP function `get_post_meta()`, it is better practice to use the relevant ACF function such as `get_field()`. Why? Because ACF will format the value depending on the field type and make development quicker and easier!

To retrieve a field value as a variable, use the [get\_field()](https://www.advancedcustomfields.com/docs/functions/get_field/ "get_field()") function. This is the most versatile function which will always return a value for any type of field.

To display a field, use the [the\_field()](https://www.advancedcustomfields.com/docs/functions/the_field/ "the_field()") in a similar fashion.

Here’s a basic usage example, and please be sure to view the [code example](https://www.advancedcustomfields.com/docs/code-examples/ "Code Examples") page for more.

```
<?php

/**
 * Template Name: Home Page
 */

get_header(); 

?>

<div id="primary">
    <div id="content" role="main">

        <?php while ( have_posts() ) : the_post(); ?>

            <h1><?php the_field('custom_title'); ?></h1>

            <img src="<?php the_field('hero_image'); ?>" />

            <p><?php the_content(); ?></p>

        <?php endwhile; // end of the loop. ?>

    </div><!-- #content -->
</div><!-- #primary -->

<?php get_footer(); ?>
```

## Does ACF have a Shortcode?

Yes, you can use it in the same way as the [the\_field()](https://www.advancedcustomfields.com/docs/functions/the_field/ "the_field()") function. It looks something like this:

```
[acf field="{$field_name}"]
```

You can also specify the $post\_id to fetch the value from.

```
[acf field="{$field_name}" post_id="{$post_id}"]
```