Jump to content

Header anchor links to work on other pages

Recommended Posts

Site URL: https://www.pozeband.com/boutique/p/t-shirt-noir-unisexe-grand-logo-smlxl

Hi,

I have set anchor links in my header which can glide down to sections of my home page with code blocks.

When I'm on another page, like a product page (which is the site URL I have linked), if I click on my anchor links in my header, which just contain, for example "#biographie" or "#contact", it just stays on the product page because it's not mentionning my website's name, like so: "pozeband.com/#biographie"

So, I have added my full website URL + the anchor to my header links, such as "pozeband.com/#biographie" and "pozeband.com/#contact".

My issue is that, now, when I'm on my home page and that I click on my header links, it reloads the full page before gliding down to the anchors.

Is it possible to have my header anchor links be "#biographie", "#contact" when I'm on my home page
AND
have my header anchor links be "pozeband.com/#biographie", "pozeband.com/#contact" on all other pages?
(or any another way to make it work as intended)

Thanks!

EDIT: #biographie and #contact in my examples are anchors which are on my homepage

Link to comment
  • Replies 1
  • Views 555
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

7 hours ago, pozeband said:

Site URL: https://www.pozeband.com/boutique/p/t-shirt-noir-unisexe-grand-logo-smlxl

Hi,

I have set anchor links in my header which can glide down to sections of my home page with code blocks.

When I'm on another page, like a product page (which is the site URL I have linked), if I click on my anchor links in my header, which just contain, for example "#biographie" or "#contact", it just stays on the product page because it's not mentionning my website's name, like so: "pozeband.com/#biographie"

So, I have added my full website URL + the anchor to my header links, such as "pozeband.com/#biographie" and "pozeband.com/#contact".

My issue is that, now, when I'm on my home page and that I click on my header links, it reloads the full page before gliding down to the anchors.

Is it possible to have my header anchor links be "#biographie", "#contact" when I'm on my home page
AND
have my header anchor links be "pozeband.com/#biographie", "pozeband.com/#contact" on all other pages?
(or any another way to make it work as intended)

Thanks!

EDIT: #biographie and #contact in my examples are anchors which are on my homepage

I have one solution for your issue. With the header nav anchor link, we will create 2  link pages:

- One link for anchor link on Home Page, we set it's link with #yourtargetid

- One link for anchor link on other Site, we apply it's link with /#yourtargetid

We can use some pure Css code to hide/display the suitable header.

Hope that it makes sense

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.