How can I display multiple products on a blog post?

I am working on displaying products on blog posts and have managed to get a single product to display.

Is there a way to get all products to display?

The code I’m using: (It looks at the tags in blog post, finds the one containing product_[product name] and displays it.

{%- liquid
    for tag in article.tags
        if tag contains "product_"
            assign prod_handle = tag | split: "_"
            assign blog_prod = all_products[prod_handle[1]]
        endif
    endfor
%}
            
{% if blog_prod %}
    ## Recommended solutions
    
        {% include 'use-case-product-grid-item' %}
    

{% endif %}

Hi @JoshSpires

I understood your concern. I came to know that you can achieve it using custom code.

Please add the below code to the file

{% assign allhandles =''%}
{%- liquid
    for tag in article.tags
        if tag contains "product_"
            assign prod_handle = tag | split: "_"
            assign blog_prod = prod_handle[1]
            assign allhandles = allhandles | append: ',' | append: blog_prod
        endif
    endfor
%}
{% assign newTagList = allhandles | remove_first: ',' | split: ',' %}
{%- for tag in newTagList -%}
{%- assign product = all_products[tag] -%}
{%- include 'product-grid-item' -%}
{%-  endfor  -%}

I hope it’s helpful to you.

If you want a way to display products in a blog post just using the normal blog editor, I made an app that lets you embed multiple products into your posts.

https://apps.shopify.com/product-embed