Adding a link to a text widget

  • Unknown's avatar

    How do I add a link to an external URL inside the text widget in my sidebar?

    At the moment I have added a link widget under the text but I’d like to link the characters (Map) within the text widget to a Google Maps page.

    I searched and read about the workaround using a new post to create the necessary HTML but I can’t see how or where to insert this into the widget text as Unlike a page there is no facility to toggle between Visual and Text with a text widget as far as I can see.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    You can add a link to the text widget, you just have to code the HTML by hand. in your case the code you would add to the end of your text widget is.

    <a href="http://guesthousestorytellersdotcom.files.wordpress.com/2014/08/hillcrestmapper.jpg?w=396&h=91">Click for Map of the Hillcrest Centre</a>

    Just copy and paste the code above to the bottom of your text widget and save. When you refresh your blog, the code should render the link correctly.

    As for the workaround to which you refer, that works too. The steps are:

    1) create the necessary HTML in a test post or page using the visual editor.
    2) switch to the “text” view and copy the generated code.
    3) paste the code directly into the text widget and save.

    There is no way to toggle between visual and text for the text widget–you only have the text editor, so your options are to code the HTML by hand, or use the visual editor from a post (or page) and then copy/paste from the text view of the post. You just have to be careful to copy from the text view, not the visual view.

    I hope that helps. Let me know if you run into trouble.

  • Unknown's avatar

    Ah! I see! Many thanks Liz the fair and helpful one.

    What you gave me in fact took me to an image of the little blue icon I’d created for the link widget. But I replaced the url for that with the url of the Google map page I want to direct people too and now it works just as I’d hope.

    You are a star LIzthefair. Thank you.

  • Unknown's avatar

    What you gave me in fact took me to an image of the little blue icon I’d created for the link widget

    Whoops! Guess I wasn’t being as careful as I should have been ;)

    Glad it all worked out and more importantly that you’ve gotten a quick peek behind the HTML curtain.

    Best wishes with your site!

  • The topic ‘Adding a link to a text widget’ is closed to new replies.