How do I create exclusive member-only pages on a budget?

Topic summary

Goal: make two Shopify pages (workouts, product guide) accessible only to people with accounts, showing a signup prompt to others, without paying for Locksmith.

Key approaches proposed:

  • Liquid checks (Shopify’s templating language):
    • Simple login gate: use {% if customer %} to show content only to logged-in users (requires customer accounts enabled).
    • Tag-based gate: check a customer tag (e.g., ‘member’):
      {% if customer.tags contains ‘member’ %} show content {% else %} show “join” + link to /account/register {% endif %}
  • Initial suggestion targeted products via product.title in main-product.liquid, which doesn’t fit because the OP’s content is on static pages. Confusion persisted about where to place code and what titles to use.

Tools/resources:

  • Video tutorial link shared for restricting access.
  • App alternative suggested (Latch) to auto-manage tags and lock pages; dev disclosed affiliation.

Notes:

  • Customer accounts must be enabled for login checks to work.
  • Tag automation (e.g., when someone signs up or buys) may require an app or custom workflow.

Status: unresolved. OP still needs a page-specific implementation (not product-level). Screenshots were shared to clarify code placement.

Summarized with AI on December 11. AI used: gpt-5.

Hello, I have a fitness product and want to make 2 pages members only - workouts and a guide on how to use the product. I need these pages to be members only to collect user information. I don’t want to use locksmith as a $12 subscription is out of my budget, these costs add up quickly. I’ve looked online and chatgtp to make liquid code but nothing seems to work. How would I go about doing this?

Hi @dominikasp

By members, do you mean logged in users only and want to show products ( workouts & guide on how to use the products) for logged in users only?

If that is the case, then you can use either use customer tags or check if the current user is already a customer.

i.e. Either create a tag ‘reg_user’ for registered users and check if the customer tags contains tag ‘reg_user’ or simply check {% if customer%}

Hope this guides you.

Thanks,

Sajat


Just a small favor to ask. If this solves your problem, please do not forget to mark it as solution.

1 Like

Hi Sajat, thank you for taking the time to answer.

By members I mean people who have created an account. So those who have not signed up will see a signup screen when clicking those pages. And those who do have an account will see the guide or workout plan.

Hi @dominikasp

Please put this code on the top of your main-product.liquid code.

{%- liquid 
  if product.title == 'Your product title 1'
    assign login = true
  elsif product.title == 'Your product title 2'
    assign login = true
  endif 

  if login
     if shop.customer_accounts_enabled
       if customer
          assign loginPage = false
       else
           assign loginPage = true
       endif
    endif
  endif 
-%}
{% if loginPage %}
  Login to view product content.

{% else %}

and near the end, you should find

Please put {% endif %} right after

This should work.

Please let me know if you need any help.

Thanks,

Sajat


Just a small favor to ask. Please mark this as Accepted Solution if this helped.

I added the code but nothing changed. I likely didn’t implement it correctly but I’m not sure how to. What do I change for “Your product title 1” and two? But also these are not products just static pages. Isn’t there a code I can put in into the pages individually that will just make the user have to sign in? Thanks

This is the place where to apply this code correct? and in the other screen shot is where I would place {% endif %} after . So do I have to change the Your Product Titles? and what would I change them too? I tried URL links and just typing out the page name https://drive.google.com/file/d/1cz0m1z_ZJ-8JR2YFBBnWodf8xfT5tfBs/view?usp=sharing, https://drive.google.com/file/d/1fW8QZUMzCq6O8nFaiMccWwREsYeY412S/view?usp=sharing

Hi @dominikasp

This code should go to top of the page.

{%- liquid 
  if product.title == 'Your product title 1'
    assign login = true
  elsif product.title == 'Your product title 2'
    assign login = true
  endif 

  if login
     if shop.customer_accounts_enabled
       if customer
          assign loginPage = false
       else
           assign loginPage = true
       endif
    endif
  endif 
-%}
{% if loginPage %}
  Login to view product content.

{% else %}

and yes, the {% endif %} should go after , like as shown in your screenshot.

As for the product name, you need to add individual product names. You can search for the products that you would like to enable login on and copy/paste the name of those products,

Hope this helps you.

Please DM me your main-product.liquid and your products if you require any further assistance.

Thank you

Sajat


Just a small favor to ask. Please mark this as Accepted Solution if this helped.

Hey @dominikasp , need a solution for restricting access to specific products or pages on your Shopify store? Watch this informative video:

Hey — you can definitely make specific pages members-only without paying for Locksmith. The main idea is to check if a customer has a specific tag (like member) before letting them view the page, and redirect or show a message if they don’t. For example, in Liquid:

{% if customer.tags contains 'member' %}
  <!-- show page content -->
{% else %}
  <p>This content is for members only. Please join to access.</p>
  <a href="/account/register" class="btn">Join Now</a>
{% endif %}

The tricky part is managing the tags automatically when someone signs up or purchases a membership. That’s where apps can save a lot of time. My app Latch handles this out of the box:

  • Lock pages or collections by customer tag

  • Keep everything visible to non-members but show a custom “join” message

  • Auto-tag customers when they sign up or purchase a membership

Full disclosure: I’m the developer of Latch, so happy to answer any questions if you want to see how it would work for your setup.

Best of luck!