How to insert anchor link code on a Dawn Theme product page?

How do you insert code for an anchor link on the product page to another section on same page?

1 Like

Hi @Rob4836 ,

You can provide the ID of the section as the value of the href with a hash tag.

Code should show like below.

Bring me to some Id

1 Like

Find the shopify tempalte ID being used
then when you insert a link for the button

use and insert where you want it to go

#shopifytempalte-xyz-xyz

Hello! I have the same issue. Could you please advise on how to find the section ID please? thank you!

NVM found it :slightly_smiling_face:

Hi there!

I’ve been trying to follow the steps you mentioned to link a specific section on my About us page but it doesn’t seem to work. Whenever I click on the submenu item it says page not found. I’m not sure what I’m doing wrong. Any ideas?

My store is here

Hi @FlorenciaDoy ,

You are missing the word pages. See correct link below

https://boggybayoumeats.com/pages/about/#shopify-section-template--16095063539953__1654538660f91a9f9f
1 Like

Silly me! Thanks a ton :slightly_smiling_face:

Just one more question. I noticed that whenever I add a submenu, the top menu items stop working. They don’t link to the correct page anymore. Is there a way to fix that?

@FlorenciaDoy

Are you talking about the About word? The parent link is suppose to just open the child link, that is the desired function. If you let the parent link navigate then you will not be able to click the child link.

1 Like

Ok, I see. Thanks for your help!

1 Like

The solution provided only works if you use the standard text area provided in the standard page template, however if you are using any other page widget (banners, text etc) to build your page then this will not work as none of these widgets allow you to insert/edit HTML.

If, like me, you’re using widgets to populate your pages then you will need to do the following:

  1. Activate your browser code inspector (usually right click on the target link area and select “inpsect”.

  2. In the HTML find the section ID for that widget, it’ll be something like <section ID=“shopify12345555etc”

  3. Copy the section ID, that is the anchor you will use to link to

  4. Add your button somewhere else, and insert # followed by the section ID e.g. #shopify123456etc

  5. Make sure you hit ENTER

  6. Publish page.