Links List In A WordPress Sidebar Text Widget

Creating a list of links in a WordPress text widget is not hard to do if you know a little bit about HTML coding. If you don’t have any HTML knowledge you can still create a list in a WordPress text widget too, if you know where to find the right code to copy. This WordPress guide will show you how to find and copy the code to match the other lists shown on your WordPress sidebar.

First lets just create a simple list, this can be done using simple HTML code. Remember WordPress sidebar text widgets can accept HTML, plain text or scripts. Below is an example of a list of links, your theme may have a style for this type of list in its sytlesheet. If it does it will pick up the style that matches your sidebar. If not you will just have a simple list. Notice the first and third links open in the same window, the second link will open the link in a new window by using target=”_blank in the URL . The names of the sites; “Site One Name”, “Site Two Name” and “Site Three Name” are the anchor text or what will be shown as the link to be clicked.

<ul>
<li><a href=”http://www.site1.com/”>Site One Name</a></li>
<li><a href=”http://www.site2.com/” target=”_blank”>Site Two Name</a></li>
<li><a href=”http://www.site3.com/”>Site Three Name</a></li>
</ul>

Here is a little trick you can use to find the same code to use to match an existing WordPress widget list. Depending on what browser you are using, you are using Firefox right? No? Well you should be. Anyway when you are looking at your WordPress blogs main page with Firefox click View then Page Source on the tool bar and the code for your current page will show. Internet Explorer is similar click View then Source. Now you will see the source code of your blog. Next look for the area where the sidebar begins which is usually something like this: <div class=”sidebar”>. Now look for the type of widget you want to copy for your new text widget.

In the case below I used the Archives widget class to generate my list of links to look exactly like the Archives widget. Pay close attention to the code to make sure you get all the appropriate opening and closings tags. And In this case I am showing where to change the name from Archives to Change The Title Of The Widget Here. Placing all of that code in the text area will eliminate the need to use a title for the text widget, this is taken care of using “widgettitle” class. Simply copy all the code from the widget found in the souce code and change the tilte of the widget, the URLs and the anchor text.

    <li id=”archives” class=”widget widget_archives”><h2 class=”widgettitle”>Change The Title Of The Widget Here</h2>
<ul>
<ul>

<li><a href=”http://www.site1.com/”>Site One Name</a></li>
<li><a href=”http://www.site2.com/” target=”_blank”>Site Two Name</a></li>
<li><a href=”http://www.site3.com/”>Site Three Name</a></li>

</ul>
</li>

Remember it is very important to close all tags or you can really mess up the sidebar! You shouldn’t use the code here either, use the specific code from your current WordPress theme and it may need changed when changing themes. When you are done save your changes, check your blog and marvel at your handiwork! Remember if the girls don’t find you handsome they should at least find you handy!



Share This AddThis Social Bookmark Button Sphinn Gregarious FeedFlare

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!


Tagged with ,


Related Posts





5 Responses to "Links List In A WordPress Sidebar Text Widget"

  1. Or you could get a plugin to do it all for you

  2. […] Links in a WordPress Sidebar Text Widget - This post by WordPress Max provides the code and explains how to create a sidebar text widget. […]

  3. Very nice Article .Really a useful one.

    Thanks for it .

  4. Thanks for this

    Needed this yesterday lol

  5. I really wanted to set something up like this for quite some time now!

    Thanks a ton!

Discussion Area - Leave a Comment

If you have a question about your blog please leave a link to it. Please don't ask questions like "Why don't my blog work right?" and expect an answer. I can't fix stupid.

Two links or less are welcome, any more and your comment will be spammed! Nofollow has been disabled, feel free to use your keywords or site name as your name for anchor text. Some comments may be moderated and will not appear until approved. Please submit only once.



XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Or just copy the example below and change your details.
Example - <a href="http://www.YourSite.com" target="_blank">Title Of Site</a>