How to Add Links in a Text Widget

September 5, 2009

One of the features that I would love to see in wordpress core is having the text widget with a wysiwyg editor, just like the editor we use to create a new post or page and that makes it so easy for you to insert images, links and lets you easily play with your text without having to know code.

To add a link in your text widget, the html code you should use is this :

<a href=”http://yoururl“>some text</a>

The url might be an internal or external link in the form , and some text , is the text visible to the user.

Sometimes when you want to point the visitor to an external site, you may want the new site to be opened in a new tab in your browser, so that the user stays in your website. In this case you add to the code target=”_blank”

So, the new code is :

<a href=”http://www.yoururl” target=”_blank”>Some text here </a>

If you want to have some space above the link, if it will be in the form of read more, like in the widgets in right sidebar of our website, you can simply add a  <br/> before the link code, which will cause the link to go to next line.


  1. Ria says:

    Hi, that plug in doesn’t seem to work in the latest version of wordpress, any other recommendations?

  2. Kim says:

    The code does not work for republica. Can you please provide advice on how to get it to work? Thanks!

    • Edy says:

      The code works fine with all themes. If you need more help please hit us up in the forum, thanks.

    • Aaron says:

      That’s a standard HTML code.

      It’s missing the .com in the URL though.

      Also, if you are copying and pasting it, the double quotes would need to be replaced. Just replace these (”) with these direct from your keyboard (“).

      Some text here

  3. I am unable to add a link in a WordPress widget. When I type the correct html, the stupid WordPress editor automatically changes

    to &rt;

    Evidently it thinks it’s smarter than I am and that I really want < and quote characters to appear in the display.

  4. Thank you very much. I dot want to use a plugin. Less plugins, less problems.

  5. The code for adding a link to text widget helped me. Thank you for this info.

  6. Madam ZoZo says:

    Most helpful! Thank you

  7. Mohsin says:

    thank you soooo much, I really need this code

  8. Have you evver thought about writing an ebook or guest authoring on other blogs?
    I have a blog centered on the same topics you discuss and would
    really lke to havve you share some stories/information. I
    know my readers would value your work. If you’re even remotely interested, feel free too send me an email.

  9. After exploring a few of the articles on your blog, I really like your way of writing a blog.
    I saved as a favorite it to my bookmark website list and will be checking
    back in the near future. Take a look at my web site as
    well and tell me what you think.

Leave a Reply

Your email address will not be published. Required fields are marked *



Get notified of new theme releases.

lifetime package

Get all our current and future themes with a one time payment.

View Details

Seasonal sale! Use code 'discount20' to get 20% discount on all products including our Lifetime Package.
Summer is here!! Use code 'summer30' to get 30% off all our themes including the Lifetime Package.