Site logo

Archived topic

Back to Top Button and anchor

1 reply · Started by Jesús on December 15, 2018

Viewing posts 1–2 of 2

Hello!

I would like to know if I active the button "back to top". Can I configure the anchor to that this button navigate to a custom anchor/id of h2?

Thank you! =)

The back to top button will always go to the top.

However, you could add an element into a Hook Element in the generate_after_footer hook:

<a class="go-to-section smooth-scroll" href="#your-section">GO</a>

Then position it with some CSS:

.go-to-section {
    display: block;
    height: 50px;
    line-height: 50px;
    width: 50px;
    text-align: center;

    position: absolute;
    right: 20px;
    bottom: 20px;

    background: #222;
    color: #000;
}

Then just activate smooth scroll in Customize > General.

This archived topic is closed to new replies.