# Add Membership Link Snippet to Customer Account Template

{% hint style="warning" %}
If you have upgraded your Shopify store to Extensibility, then you will not be able to follow these instructions since you are unable to edit the checkout code.

In this scenario, you can add a link in your navigation that leads customers to the .com/community/membership page where they can either sign up for your program or log into their existing account
{% endhint %}

The membership link snippet must be installed so your customers have a way to click to their membership landing page

Add the following snippet to the *templates/customers/account.liquid* file found in your theme code:

{% hint style="info" %}
We recommend adding the snippet near the logout link, but it will be different with every theme.
{% endhint %}

```html
<a class="inveterate-manage-membership" data-inveterate-manage-membership href="/community/membership?customerId={{ customer.id }}">
 Manage Membership
</a>
```

## Where to Add the Snippet

Select the theme and click `Actions -> Edit code` to open the Shopify code editor. Find the file *templates/customers/account.liquid*

1. Navigate to the Themes menu
2. Select the theme you want to edit and click `Actions -> Edit code` to open the Shopify code editor
3. Find the file *templates/customers/account.liquid*
4. Search for *account\_logout\_url* and paste the snippet above or below.
5. Click Save

{% hint style="info" %}
For the best user experience, we recommend adding the snippet **above the logout link**, then adding either spacing (there are several ways to accomplish spacing but one way would be a self-closing `<div/>` in between with horizontal margin), or a line-break `<br>` to separate them by line. You can see this example in lines 20-33 below, and then below that how it looks on the frontend.
{% endhint %}

<figure><img src="https://231758148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjNbd2MWKOWi5A1HvQtH%2Fuploads%2F8Vn9k2RufAwkqrrVUMFj%2FScreenshot%202024-05-09%20at%203.42.39%E2%80%AFPM.png?alt=media&#x26;token=222abca5-bc1b-4013-b747-c588cb0db055" alt=""><figcaption></figcaption></figure>

<figure><img src="https://231758148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjNbd2MWKOWi5A1HvQtH%2Fuploads%2FrD6ZgSeNOe0lBGSIUQoy%2FScreenshot%202024-05-09%20at%203.46.59%E2%80%AFPM.png?alt=media&#x26;token=039d5ffe-060f-4979-8d38-df10fa6f6bd8" alt=""><figcaption></figcaption></figure>

#### Download the PDF below for step-by-step instructions

{% file src="<https://231758148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjNbd2MWKOWi5A1HvQtH%2Fuploads%2FP5cYFWHmK9kydA8afSKC%2F6.%20Add%20Membership%20Link%20Snippet%20to%20Customer%20Account%20Template.pdf?alt=media&token=a8529571-3f57-46ca-9eac-97b94f0739fa>" %}

{% embed url="<https://youtu.be/YmJ_oa2bdpg>" %}

## How to Add the Snippet When Your Theme is Using JSON Templates

1. ### Open the theme code editor

   <figure><img src="https://231758148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjNbd2MWKOWi5A1HvQtH%2Fuploads%2FcIJGbF2FNLyXPueXruBA%2Fimage.png?alt=media&#x26;token=fad87ae6-c96d-471c-9ae6-5b6e4d1ef8f7" alt=""><figcaption></figcaption></figure>
2. ### Open the templates/customers/account.json file to find what liquid files are used on the account page

   <figure><img src="https://231758148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjNbd2MWKOWi5A1HvQtH%2Fuploads%2F06gHrdozc8CknZksSV73%2Fimage.png?alt=media&#x26;token=9b91e754-870c-4cda-b925-ffc85b122064" alt=""><figcaption></figcaption></figure>

   Take note of the `type` value for any sections listed here, which is "main-account" in this case. This corresponds to the liquid file or files that make up the customer account page. So, in this case, we are looking for a single liquid file: `sections/main-account.liquid`
3. ### Add the Inveterate snippet to the sections/\<your-theme-section-name>.liquid file

   <figure><img src="https://231758148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLjNbd2MWKOWi5A1HvQtH%2Fuploads%2F0GDFeODFgONhXHAnOafu%2Fimage.png?alt=media&#x26;token=d5b4b64c-b730-4db2-824b-9b86f877aea2" alt=""><figcaption></figcaption></figure>

   And be sure to click the save button before you exit.
