Can not link any text or button

I’m having trouble with
I can not link text or button to anything/ All buttons and text will not let me link them.

Working in
Wix Editor

Site link

What I’m trying to do
add a link to my text and buttons

What I’ve tried so far
I click on choose link and the window does not open to link to page, URL etc

Happens to all text and buttons and I have cleared my cache, deleted buttons and added new ones. I have buttons on other pages which I had to create on another site which I copied and pasted them over. However, this is only useful if I want to link to a URL and not a page within my site.

Hi, @Richie2 !!

Hmm, it might just be a temporary glitch with the editor. Since it’s also possible to configure it using code, why not give that a try? :innocent:

Alternatively, you could use code like this to set links for both button elements and text elements all at once, which can be really convenient. Feel free to give it a try if you’re interested! :raising_hands:


import wixLocation from "wix-location";

$w.onReady(() => {

  const elementLinks = {
    text0: "https://amazon.com",
    text1: "/page-1",
    button1: "https://yahoo.co.jp"
  };

  setLinks(elementLinks);

});

function setLinks(elementLinks) {
  for (const [id, url] of Object.entries(elementLinks)) {
    $w(`#${id}`).onClick(() => wixLocation.to(url));
  }
}

Thanks i will give it a try.
Surely, someone from wix can fix this issue as I can add links on another site with wix editor

The code does not work

Did you customize this part to fit your environment before running it? :raising_hands:

  const elementLinks = {
    text0: "https://amazon.com",
    text1: "/page-1",
    button1: "https://yahoo.co.jp"
  };

You need to change text0 and text1 to the IDs of the text elements on your site’s page, and likewise, button1 should be replaced with the ID of the button element on your site’s page. Of course, three elements won’t be enough, so you’ll need to add more element names and corresponding destination URLs as needed. :slightly_smiling_face:

By the way, “/page-1” is also just an example to show how to navigate between pages within your site. Please check the URL slug of your own site’s page and replace it accordingly. :grin:

When you say “can not link text or button to anything” - what does that mean practically?

Are you trying to link to a specific page and it won’t let you? Is it giving an error, not showing the option or something else?