If you want the URL in an accordion, you can use this code I ended up making.
If you don’t want it in an accordion, you’ll have to figure out how to make it work for your purposes. Just remove the stuff about the accordion and replace with whatever you want to use.
{% unless product.metafields.my_fields.ACCORDION_HEADER == blank %}
{{product.metafields.my_fields.**ACCORDION_HEADER** }}
{% endunless %}
So you will first make a product metafield for the accordion header if you are using the accordion. This will allow you to use a unique header for each product page. (ie: photos, documents, files… whatever descriptor you need to use for your URL’s)
Then you need to make product metafields for the URL’s themselves, and if you want to be neat about it you can also make a ‘URL Title’ product metafield for each URL. If you don’t do this the URL’s just show up as a regular link:
( https://www.thethingsshopifymakesusdo.com )
and this can look kind of sloppy in my opinion.
The best thing to do is estimate the number of URL’s you will need on each product page and add an extra metafield or two just so you have them available.
So:
Accordion Header - single line text metafield
URL 1 - url metafield
URL 1 Title - single line text metafield
URL 2 - url metafield
URL 2 - single line text metafield
…and so on. MAKE SURE you create these in a somewhat practical order, because the geniuses at Shopify don’t allow you to rearrange them on the product page afterwards… You don’t want to create URL 1 then URL 2, 3, 4 etc. and then create URL 1 Title, URL 2 Title etc. because then you will eventually have to navigate to a different page on the product page to enter all the titles if you have a lot of metafields and you’ll probably forget which title belongs to which URL. (I only know because I made this mistake)
This is coded so if you don’t have any of these metafield values filled in on a specific product page, nothing shows up. Even if you don’t have the accordion header filled in, no accordion will show up. So it’s nice and clean.
I have this code pasted into a custom “Liquid” section that I have placed under the product description. But you can put it wherever. If you need any help making it work for you let me know and I’ll help you out if I can. Unfortunate that Shopify doesn’t think these things through and forces store owners to become professional coders to make the platform they pay for work.