Creating Links in Text Widget
-
How do you create links in text widgets? I tried what I thought was the correct code text but after I save the changes the href element of the code disappears from the text box and there is not an active link on my website.
I’m basically trying to create a ‘my favorite posts’ sidebar.
-
Sounds like you may be trying this on an incompatible browser such as IE6 which happened to me (no codes get saved in the widgets) until I switched to FireFox. The following links may be useful.
-
Thanks for the links. I’m using the most recent mozilla. I’m also fairly certain I’m writing the code correctly since when I wrote it out above (after the words ‘correct code’), it rendered the word text as a hyperink. This is confusing.
-
Links in widgets are no different than links in a post. For a text link, the code is this, if you want the link to replace your blog in the window of your browser:
<a href="URL_HERE">TEXT_HERE</a>
Or this, if you want it to open in a new window:
<a href="URL_HERE" target="_blank"> TEXT_HERE </a>
The only complications I can think of now are that successive links in a text widget will be stuck together, or that the text may show up too close to the sidebar item below it. Use this for line breaks:
<br />
And this for blank lines:
<p> </p>
If you still can’t make it, copy the code you’re trying to use and paste it here between backticks (that’s what produces the frames you see above) so we can have a look.But for a “favorite posts” list there’s a more convenient way. Open two windows in your browser, main blog page in the one, visual post editor in the other, drag & drop post titles to editor, arrange them as you wish, then switch to html editor, copy everything and paste it in the widget.
-
-
Thanks a lot for your help. I seem to have figured it out now.
One other question. This one may be a bit more complicated.
Basically, I’m using the text widget to create a list of my favorite posts (if you clink on my link your find it labeled “Best Posts”) because the popular post widget only includes traffic over the last few days.
What code would I need to make the spacing on my widget similar to that of the recent/popular post widgets, which have some space after the title and the links indented?
Thanks.
-
Try using a list.
<ul> <li> your text link </li> <li> next text link </li> (repeat as necessary) <li> last text link </li> </ul>HTH
-
-
-
-
-
-
If you’re a newbie (and you seem not to be, but I’m putting it here for future reference) you can compose the text widget as a DRAFT post, then click to the HTML editor and copy all the code, which you then paste into the widget. It’s how I do my text widgets, since I’m no coder.
- The topic ‘Creating Links in Text Widget’ is closed to new replies.