creating anchor links in html

Highlighted
Tourist
7 0 1

Hello, relative newbie here. I'd be really grateful if someone could talk me through how to create anchors and then link to them from another page. I've read a few tutorials but when I try and follow them I break the code on my page.

 

What I'd like to do is have a product info page that goes like this:

 

H2 heading anchor A

text

 

H2 heading anchor B

text

 

H2 heading anchor C

text

 

 

And so on, and then from other pages I'd like to link to those anchors. I think it's probably quite simple but I think because the anchor locations have headings styling applied, I keep messing up the html when I try.

 

Any support much appreciated.

0 Likes
Highlighted

Hello @cc2019,

Please follow below link..May be It will helpful to you..

https://community.shopify.com/c/Shopify-Design/Adding-Anchors-to-Blog-Posts/td-p/477884

 

Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
Tourist
7 0 1

hey there - thanks for this. I'm a bit confused by the { marks. How about if I just paste some of my code in?

 

 

<h2>Mugs</h2>
<p><img src="https://cdn.shopify.com/s/files/1/0259/5012/6152/files/Screenshot_2019-11-30_at_12.27.16_480x480.png?v=1575116865" alt="" width="149" height="149" /></p>
<p><span>325ml/11oz, ceramic, dishwasher and microwave safe.</span></p>
<p> </p>
<p> </p>
<h2>Shopping bags - square style</h2>
<p><img src="https://cdn.shopify.com/s/files/1/0259/5012/6152/products/collage-blue-hares-shopping-bag_480x480.jpg?v=1571165699" alt="" width="306" height="306" /></p>
<p><span>100% polyester canvas with strong webbing handles long enough to go over the shoulder. When laid flat, the bag area measures 38cm square. Printed and assembled in the UK.</span></p>

How should I edit the H2 tags to make them anchors? I'll then be linking to them from another page.

0 Likes
Highlighted

try this

<h2>
<a href="{{ url link }}">
 Mugs
</a></h2>
Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
Tourist
7 0 1

sorry, I'm still confused by your response - the H2 are the anchors. then I'll be linking to them.

 

so for the links so far I've got: 

<p><a href="https://curiositycabinet.co.uk/pages/product-information" target="_blank" rel="noopener noreferrer"><span>Product information</span></a></p>

 

but I need the H2s on the product page to be anchors, and then I need to amend my html above to link to those anchors. 

0 Likes
Highlighted

Hello 

Try this, this will create your h2 tag anchor link. 

<a href="{{ url link }}">
<h2> Mugs</h2>
</a>
Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
Explorer
62 2 6

Hi,

I've using Streamline -theme on my Shopify. I need to create anchor link to my product page.

https://www.digikaupat.fi/products/verkkokaupan-perustamisopas

How do I create the anchor link, which allows click and move straight to the page's contact form?

0 Likes