How to change headway’s default “go to top” link in the footer

go-to-topLately I got a client that requires me to change the default headway’s Go To Top link to display as “Return To Top”. At first I was thinking of creating a block and just use an image that will serve as a new go to top graphics, but then I thought it was a little uncomfortable. And so I needed to find another way out. After playing around with the hooks and filters that headway is offering, I came up with the following code that simply solve my little problem.

The Custom Go to top Code

//Change Go To Top Text
function change_gototop() {
     return '<a class="footer-right footer-go-to-top-link footer-link" href="#">Return To Top</a>';
}
add_filter('headway_go_to_top_link', 'change_gototop');

So there you go, just copy the above code and paste it in your functions.php.

Have fun! 😀

Leave a reply

Book your free consultation
Share This