How to change the link of the primary call to action button?

Hi,

I would like to change the link of the primary call to action button. I knew I can do it in “Customizer”. But my website has two languages. Therefore, this method cannot change both call to action buttons’ link. Actually, I want one of the buttons in English version links to here, the another button in the Chinese version links to here. Please help

Hello there,

What plugin did you use to setup the multilanguage? This solution might be what you are looking for.

Regards,
Kharis

I use polylang to translate my website. I copied your CSS code their and changed the URL and language code inside the CSS. Then, the call to action button on both Eng Slider page and translated Chinese page don’t work. Please have a look. I have remained the current settings for you to inspect.

Hello there,

I noticed the buttons’ URLs are working fine. They point to the URLs you specified the custom jQuery code. Maybe you should clear your web browser’s cache and try again? Or delete the site cache from W3 Total Cache plugin.

Regards,
Kharis

Hi,
I have cleared the cache with w3 total cache plugin and cleaned up the browser cache data as well. And when I click the call to action button, it indeed linked to the place I want. But it didn’t move to that place, but only shows where it links to. Please try to click the call to action button, and you should understand what I mean.

Hello there,

Try to replace this line:


btnURL = 'http://petsittingdiary.com/#pg-122-1/'; /* URL for English */

with:


btnURL = '#pg-122-1'; /* URL for English */

This line:


btnURL = 'http://petsittingdiary.com/#pg-122-1/'; /* URL for English */

with:


btnURL = '#pg-122-1'; /* URL for English */

Let me know how it goes. I’ll wait to hear back from you regarding your stats.

Regards,
Kharis

Hi,

The codes work perfectly. Thank you for your great effort!

Hi,

I found a huge problem with your code. I have made a reply for this problem here. But it seems disappeared. You code indeed help changing the CTA button link successfully. But, once the code used, it leaded to a translation problem in homepage. The #pg-904-1 and #pg-904-2 become English, which should be Chinese.

Therefore, I have deleted the code and the translations go back to normal. If you want to see the effect, please tell me. I will immediately reply you. I am always in front of the screen.

Hi again,

I found out that it is not your code’s problem, but the problem of the w3 total cache plugin. I have uninstalled it and apply your code again, and everything works as expected. THanks so muhc for your help.