Home > Shopify Development > Link to related posts on a blog

How to link to related posts on a blog in Shopify

Sam Nguyen
Sam Updated: February 15, 2024

Share:

Drive 20-40% of your revenue with Avada
avada email marketing

The content of an online Shopify shop plays an important role to increase the traffic as well as the number of customers coming to the stores. Although the fact that blogging does not bring direct sales for Shopify sellers, the content of a shop is what all customers firstly approach. Moreover, the blogs can boost the store’s SEO, as well as increase the customer’s engagement to make more purchases. The rank in Search Engines will help the store owners to have more and more potential customers.

For the beginners of blogging, the Shopify blog can meet all their needs because it is totally free, user-friendly with high speed. Moreover, there are basic functionalities that the user enable creating a fundamental blog including inserting images and video or a visual editor. Besides, for the title and description, it also provides automatic SEO which can schedule posts, comments or tags.

However, there are few Shopify shop owners know how to improve their ranks. By keeping regular blogs, the shop websites will be considered to be active and being updated. Therefore, Search engines and Google will reward the website more highly. With a bulk of internal links especially variable blogs content in a layout; therefore, it is necessary for the admins to link the related blogs.

To create the link between the relevant blogs, this guiding article How to link to related posts on a blog in Shopify will help the Shopify users to convert the visitors to customers with very simple steps below.

Step 1: Use the variable in the layout

Firstly, the admins can use the variable site.related_posts in the layout for the post. Then the ten most recent posts will be output by default. If the store owners are running Jekyll, admins can use the --lsi flag, the relevant posts will be scanned automatically.


...
<ul class="related_posts">
  {% for post in site.related_posts %}
    <li><a href="{{ post.url }}">{{ post.title }}</a></li>
  {% endfor %}
</ul>
...

Step 2: Add the limit

The users can choose numbers of related blogs posts will be shown by adding the limit in the layout.


...
<ul class="related_posts">
  {% for post in site.related_posts limit: 3 %}
    <li><a href="{{ post.url }}">{{ post.title }}</a></li>
  {% endfor %}
</ul>
...

Conclusion

By very simple steps above in this tutorial How to link to related posts on a blog in Shopify, the Shopify store owners can create the powerful content linkings that will boost their sales effectiveness and contribute their valuable customer’s loyalty. Therefore, it is easy for Shopify sellers to drive their sales through built-in content. After this tutorial, the online traders can read more about blog posting through this article How to link to the next and previous posts on a blog in Shopify.


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.