- i only speak liquid
- Posts
- "i only speak liquid" #36: Hiding Products from Search Results
"i only speak liquid" #36: Hiding Products from Search Results
Written by Billy (a Storetasker Expert)
Hey all 👋!
Welcome to 'i_only_speak_liquid' by Storetasker, where active Shopify developers like me (Billy) share the learnings we face daily. This is my 8th and final edition of ‘i_only_speak_liquid’. Enjoy!
What I’ve been thinking about:
A common problem clients always raise to me is that they have products on their Shopify stores, that they like to have in place for features such as free gifts or upsells, and they do not want these items to be discoverable or indexed. This is especially the case if the item is free, since users could find this product and be able to purchase it without meeting the requirements.
Thankfully Shopify have thought of a great and simple way for merchants to be able to prevent this issue. It only takes a couple minutes to get setup and uses metafields, so most clients will be very familiar with the process and can easily manage it.
You start by creating a new product Metafield with the Namespace 'seo' and key 'hidden’. The Metafield type should then be ‘Number’, just like the example in the screenshot below. The client can then set the Metafield of each product that should be hidden to the value ‘1’.
By adding this Metafield, Shopify will automatically trigger a new robots metatag to be added to the product page which will ensure that both noindex’ing and nofollow’ing are in place - This essentially means that search engines will not index the product page and display it within the search results when a potential customer searches for the brand or products.
Whilst adding in custom Liquid code to a template is quite easy for a developer, this is a very helpful and useful feature that Shopify has automatically added, and is definitely something that is requested from me all the time.
3 links you can’t miss:
Ayush Soni: Each week Ayush shares 10 beautiful websites and I’ve used it as an amazing source of inspiration since I found their Twitter account
Shopify Schema Builder: If you’re ever having a difficult time trying to find the different schema types, this Schema Building tool will definitely help you
Section Rendering API: Shopify’s Section Rendering API is one of the easiest ways you can reload a section’s content without needing to reload the page or implement a lot of Javascript code to implement the dynamic events. This tutorial is a great way of quickly learning how the API works and what is possible.
One app I like:
I’ve recently been using the EG Auto Add to Cart Free Gift app for a project and was really happy with how well it works. It’s an app that allows you to add items to the customer’s cart based on specific rules. For example specific scheduling, targeting specific visitors and customers based on tags and different user groups, as well as specific products or collections, and cart values.
It’s also part of the ‘Built for Shopify’ program which is great to see and assures your clients that the apps being added to their store are verified by Shopify.
One learning as a freelancer:
The benefits of being a freelancer are amazing and allow you to be your own boss, which provides many benefits. However, one thing you quickly learn is the importance of self-discipline. Without a traditional office structure, it's easy to become distracted or procrastinate. That's why cultivating self-discipline is a vital skill for success.
One of the most valuable lessons I've learnt is the mastery of self-discipline. Setting clear objectives, maintaining to-do lists, and establishing a structured routine can make a world of difference. These strategies help you stay focused and productive, ensuring you meet project deadlines and consistently deliver high-quality work.
The benefits of this self-discipline are far-reaching. Not only does it guarantee client satisfaction and the completion of tasks, but it also helps maintain a healthy work-life balance. Over time, as you refine your self-discipline, you'll find that your freelancing career becomes more rewarding and less stressful. Clients appreciate reliability and trustworthiness, often leading to repeat business and referrals.