Skip to content

Instantly share code, notes, and snippets.

@fotoflo
Created March 10, 2021 23:05
Show Gist options
  • Save fotoflo/bca75703d31d13900efaa5e60b70d056 to your computer and use it in GitHub Desktop.
Save fotoflo/bca75703d31d13900efaa5e60b70d056 to your computer and use it in GitHub Desktop.
Shopify Admin areas. Link directly to a product or collection from it's public page
{% if customer and customer.tags contains 'admin' %}
<div class="adminArea">
<h2>Admin only</h2>
<p class="adminCTA"><a href="/admin/collections/{{collection.id}}" target="_blank">Edit Collection</a></p>
</div>
{% endif %}
{% if customer and customer.tags contains 'admin' %}
<div class="adminArea">
<h2>Admin only</h2>
<p class="adminCTA"><a href="/admin/products/{{product.id}}" target="_blank">Edit Product</a></p>
</div>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment