I am trying to create linked text on my page using the wixLocation.to() function and the linking is working for going to all my pages except for my booking page. Is there a special step I need to take since it’s a booking page? Or why am I seeing results for my other links but not this one?
Post your code.
This is what I have for the specific button, there’s nothing different between this one and the others besides where it links to.
import wixLocation from 'wix-location';
export function box9_click(event) {
wixLocation.to("/book-your-trip");
}
Make sure the box0_click function is toggled on the property panel
@jonatandor35 it reacts to the click, but it just scrolls to the top of the current page instead of switching to the new one
@garrettharr27 Maybe you misspelled the path. Or maybe it’s the path points to the current page?
This is the page that it’s supposed to be linking to, and the button is on my footer so it can be on the same page but isn’t always.
(It was on a different page when I was testing it)
I figured it out, the slug was different than what my page name was for some reason. But I’ve got it working now