WooCommerce: Show Related Products In a Blog Post!

Maybe because I’m Italian, but I like exclamation marks! Also, Italian gestures – of course. With that being said, today we look at an amazing WooCommerce customization.

I’ve finally gained back some free time to work on my personal projects, and one of these is an affiliate website. In order to drive traffic to this WooCommerce website, we have a major content strategy and we publish 7 relevant posts per month.

However, it’s difficult to drive blog readers to the shop page, so I came up with a great idea – why not adding a grid of relevant related products at the end of each blog post, based on the most used keywords?

The rationale behind this is quite easy:

  1. you have a list of product tags
  2. you have a blog post full of words
  3. you count and define the most mentioned product tag
  4. you show 10 products from that product tag

Cool, ha? Well, let’s take a look at my code, and feel free to use it on your install!

Continue reading WooCommerce: Show Related Products In a Blog Post!