How to Add Links in a Text Widget

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 https://www.vivathemes.com , 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.

11 comments

  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!

  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:

    hi,
    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.

Leave a Reply

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

 

Shopping Cart

  • Your cart is empty.

Get notified of new themes

Promotions

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

Autumn sale is here! Use code 'autumn20' 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.