Href not linking as I would like

Hi,

I am using cornerstone and trying to have an url when you click the button. The issue I have is, when I write the link on the HREF box, the result is really random, on some buttons it works, but in other buttons send me somewhere else.

Example, on my page, I wrote on the HREF www.facebook.com/cimpex

But when I click on the button, it sends me to http://cimpex.pt/#www.facebook.com/cimpex

I tried all possible combinations, with #, without, with the # replacing the /, but the results are really random. And it also happened that i manage to make it work, and the day after it was not working again.

Thanks in advance.

Hi There,

Thanks for writing in!
Please add http:// before the url alwasy when you are adding an external link. If the link having secure URL then please add https://.

Hope this works for you.

Thanks

Hi,
Thanks for the help, but unfortunately it didnt work.
I added it as you suggested, but the same happens, it redirects me here:
http://cimpex.pt/”https:/www.facebook.com/Cimpex/

Hi there,

You seem to have wrapped the href value in quotes like ”http://www.facebook.com/Cimpex/”. Kindly remove the quotes in the button’s link field and just place the URL.

Hope this helps.

Hi,
Thanks again.
I dont think I have…

But it redirects me here:

I have something on the style of the button, could that interfere?

This is what I have:
[button type=“real” style="background:#3b5998;color:white;width: 30%; display: block; margin-left: auto; margin-right: auto;width: 45%; display: block; margin-left: auto; margin-right: auto;

Thanks in advance.

Hi There,

That shortcode of yours is incomplete, please clarify.

Would mind testing this shortcode and see if it works.

[button type="real" shape="rounded" size="jumbo" href="https://www.facebook.com/Cimpex/" title="Example" icon_only="true"][icon type="money"][/button]

If it does work, please inspect your shortcode thoroughly and make sure it is complete.

And keep an eye on the quotes it should be this " not this ”

Button shortcode

If the issue persists, please provide us login credentials in a secure note so we can take a closer look.

Thanks,

Hi again,

If I use your shortcode it looks like this;

And this is the problem I have whenever I am adding style to the buttons… Every time i finish the code i get ;”] at the end.

Hi There,

Thanks for the details!

I can see you have some short-code in the custom style field. Which is causing the issue.

Upon removing this the button is working fine. Please check the facebook button on home page It goes to correct link.

Hope this helps!

Thanks

Hi,
Thanks for the help!
Does this mean I cannot have style on the button, like changing color, center it, etc and have href working?
Because even the standard codes on style from the link below dont work.
http://demo.theme.co/integrity-1/shortcodes/buttons/

Hello There,

The href field must contain the link.

If you must change the type shape and size, you will have to change it in the option as shown below.

If you want to add further inline styling, please it in the css field instead.

Hope this helps.

Hi Again!
Thank! Now I understand, i thought i could write everything on the style.
Finally it´s working just fine :slight_smile:

Hey @alfredopais,

You’re welcome! We are just glad we were able to help you out.
Thanks for letting us know that it has worked for you.

Cheers.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.