---
title: "Beginner guide: Merge Tags vs shortcodes"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview/faq/beginner-guide-merge-tags-vs-shortcodes/"
---

Understanding the difference between merge tags and shortcodes helps you get the most out of GravityView. This guide explains each concept in plain language and shows when to use one or the other.

## What are merge tags?

Merge tags are placeholders that are replaced with real data when a View is displayed. You add a merge tag to your content, and GravityView fills it with values from a form entry.

**Syntax**

- `{Field name:ID}`
- `{field_id:123}`

**Example**

```
Hello, {Name:1}! Your email is {Email:2}.
```

```
Hello, {Name:1}! Your email is {Email:2}.
```

When displayed, this becomes:

```
Hello, John Smith! Your email is john@example.com.
```

```
Hello, John Smith! Your email is john@example.com.
```

### When to use merge tags

Use merge tags when you need to display individual pieces of data, such as

- Showing a single field value inside text
- Creating custom layouts with dynamic content
- Building email notifications or confirmations
- Inserting field values into HTML templates

## What are shortcodes?

Shortcodes are WordPress commands wrapped in square brackets. They output complete blocks of content, such as an entire View or a specific part of a View.

GravityView shortcodes let you display Views without writing custom code.

**Syntax**

- `[shortcode attribute="value"]`

**Example**

```
[gravityview id="123"]
```

```
[gravityview id="123"]
```

This shortcode displays the View with ID `123` , including all configured fields, layouts, and settings.

### When to use shortcodes

Use shortcodes when you want to:

- Embed a complete View on a page or post
- Display entry tables, lists, or single entries
- Add Views to widget areas or page builders
- Quickly display content using existing View settings

Divi, Beaver Builder, and Elementor also have native **GravityView** modules (added in GravityView 3.0), so you can embed a View in those builders without a shortcode. See [Embedding Views in Divi, Beaver Builder, and Elementor](https://www.gravitykit.com/docs/gravityview/getting-started-gravityview/page-builder-support/).

## Merge tags vs shortcodes

| Feature | Merge tags | Shortcodes |
|---|---|---|
| Purpose | Insert individual field values | Display complete Views or View components |
| Syntax | `{Field:ID}` | `[gravityview id="X"]` |
| Output | Single data values | Full layouts with multiple entries |
| Best for | Custom text, emails, templates | Pages, widgets, quick displays |
| Flexibility | High (granular control) | Moderate (uses View settings) |
| Learning curve | Moderate | Low |

![Screenshot: Using a merge tag inside a Custom Content field to display a field value dynamically in a GravityView.](https://www.gravitykit.com/wp-content/uploads/2026/04/file-MVZt3Wrwbk.png)
*Using a merge tag inside a Custom Content field to display a field value dynamically in a GravityView.![Screenshot: Embedding a GravityView on a WordPress page using the*[gravityview] shortcode in the Shortcode block.](https://www.gravitykit.com/wp-content/uploads/2026/04/file-BtoknhT7iw.png)Embedding a GravityView on a WordPress page using the  shortcode in the Shortcode block.

## Practical examples

### Example 1: Display a directory

**Goal:** Show a searchable member directory on your site.

**Best choice:** Shortcode

Add the shortcode to any page:

```
[gravityview id="456" search_field="1,2,3"]
```

```
[gravityview id="456" search_field="1,2,3"]
```

This displays the entire View with search enabled.

### Example 2: Create a custom welcome message

**Goal:** Show a personalized greeting with the visitor’s name and membership level.

**Best choice:** Merge tags

Add this to a **Custom Content** field in your View:

```

  Welcome back, {Name (First):1.3}!
  Your membership level: {Membership Level:5}
  Member since: {Date Created:date_created}
```

```
div class="welcome-box">
  h2>Welcome back, {Name (First):1.3}!h2>
  p>Your membership level: strong>{Membership Level:5}strong>p>
  p>Member since: {Date Created:date_created}
```

### Example 3: Entry details page

**Goal:** Display all information for a single entry.

**Best choice:** Both

- Use a shortcode to embed the View on a page:
    
    `[gravityview id="32" secret="936de4f06fe9"]`
- Use merge tags inside **Custom Content** fields to control formatting.

## Common pitfalls and troubleshooting

### Merge tags do not work in the WordPress editor

**Problem:** A merge tag such as `{Name:1}` appears as plain text.

**Cause:** Merge tags only work inside GravityView contexts, such as Views, Custom Content fields, and GravityView widgets.

**Solution:** Use a shortcode to display the View on a page:

```
[gravityview id="123"]
```

```
[gravityview id="123"]
```

### Mixing merge tag and shortcode syntax

**Incorrect**

```
[{Name:1}]
{[gravityview id="123"]}
```

```
[{Name:1}]
{[gravityview id="123"]}
```

**Correct**

```
{Name:1}
[gravityview id="123"]
```

```
{Name:1}
[gravityview id="123"]
```

### Missing field ID in a merge tag

**Problem:** Using only the field name.

- Incorrect: `{Name}`
- Correct: `{Name:1}`

> **Tip:** You can find field IDs in the Gravity Forms form editor or by using the merge tag selector in GravityView.

### Shortcode displays as text

**Possible causes:**

- The View is not published
- The View ID is incorrect
- The shortcode is missing brackets or contains a typo
- A plugin conflict prevents shortcodes from rendering

**Solution:** Confirm the View is published and double-check the shortcode syntax.

## Summary

Choose **merge tags** when you:

- Need precise control over individual field values
- Create custom text layouts or templates
- Build personalized content
- Work inside GravityView Custom Content fields

Choose **shortcodes** when you:

- Want to display a complete View
- Embed Views in pages, posts, or widgets
- Prefer using View settings instead of custom formatting

## Related documentation

- [GravityView Merge Tags](https://www.gravitykit.com/docs/gravityview/merge-tags/merge-tags/)
- [Using the GravityView shortcode](https://www.gravitykit.com/docs/gravityview/shortcodes/using-the-shortcode/)
- [Overview of shortcodes added by GravityView](https://www.gravitykit.com/docs/gravityview/shortcodes/an-overview-of-shortcodes-added-by-gravityview/)