Hi, feeling defeated so giving this forum a try.
Can anyone point me in the right direction to pull in the SKU code for title tag, please? I’ve found how to do this on product pages etc, but can’t find anywhere that references how to include within title tag for SEO purposes.
How exactly do you want it to be output? What if no sku exists? What if some variants have it but others don’t?
General approach will be to find the title tag liquid usially in theme.liquid and then use some of this in it:
{%- assign current_variant = product.selected_or_first_available_variant -%} {{ current_variant.sku }}
Thank you Kieran, worked a treat!