0

I have a WP site, www.glitzyla.com and I want to attach a URL link to the button on the hero image, but for some reason it just will not work.

This is the code I currently have and the download_link is in phpmyadmin

<button><type="" onClick="<?php echo get_custom('download_link'); ?>" target="_blank" class="">download ios app</button>
Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701

3 Answers3

0

Your source indicates you don't have an anchor tag <a> within your button. You're also not linking to anything as your destination URL is within an onclick action. Your link should be set up as followed:

<a href="https://itunes.apple.com/us/app/glitzy-organic-manis-pedis/id1111503407?ls=1&amp;mt=8" target="_blank" class="">download ios app</a>
privateer35
  • 365
  • 2
  • 6
  • 14
0

In Bootstrap You can use Following Code to create link on Button. Buttons

<a href="<?php echo get_custom('download_link'); ?>" class="btn btn-primary btn-lg disabled" role="button">download ios app</a>

Also Check out This Answer

Community
  • 1
  • 1
Hamza Zafeer
  • 2,360
  • 13
  • 30
  • 42
0

Looks like you have an error with your HTML code.

You should use the type attribute inside the HTML element like this:

<button type="">download ios app</button>

If it doesn't work, you can try warping the the button with <form> tags.

Here is an example:

<form method="get" action="http://www.apple.com/">
    <button type="submit">Apple</button>
</form>
flux
  • 108
  • 8