Support » Fixing WordPress » How can I link a button to a URL?

  • Hi:

    I’m a newbie to WordPress and fairly new to HTML. I’ve tried everything I can think of but can’t get my button to link to the URL I want to direct it to. I think I’m missing something basic about how to place the URL within the bracket. Can someone help? Here is the code I’m working with. The button itself is displaying with the text I want (Download E-book) but the link is not going to the one I’ve placed here. Any help would be much appreciated.

    ————

    [button style=”glass” size=”small” icon=”arrow-dark” textcolor=”#f5f0f0″ bgcolor=”#0a88f7″ ]Download E-book[/button]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is this a shortcode? If so, what plugin, theme, or code is providing it?

    It isn’t HTML. HTML doesn’t use square brackets in that context. You need < and > instead.

    As said, this seems like a shortcode. Check the theme documentation (if avalible), it should be thoroughly explained there.

    On second thought, if i am not mistaken, is this what the code you posted looks like?
    [button style="glass" size="small" icon="arrow-dark" textcolor="#f5f0f0" bgcolor="#0a88f7"] <a>Download E-book</a>[/button]

    …considering there is a link in your text going nowhere. If so, then the explanation is easy, you just need to add the destination for the link, like this;
    [button style="glass" size="small" icon="arrow-dark" textcolor="#f5f0f0" bgcolor="#0a88f7"] <a href="http://www.YOUR-LINK-HERE.com">Download E-book</a>[/button]

    Thread Starter npekala

    (@npekala)

    Thanks very much for your help on this. Yes, this is a shortcode for a button in the Natural theme. There wasn’t anything about linking to the buttons in the documentation but after playing around with your suggestion, I found the magic formula that worked. The trick was inserting brackets around the a href. Here it is just fyi:

    [button style=”glass” size=”small” icon=”arrow-dark” textcolor=”#f5f0f0″ bgcolor=”#0a88f7″ [a href=”http:”]Read More[/button]

    Thanks again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I link a button to a URL?’ is closed to new replies.