Question of the day: How can I display linked images for other websites and blogs in my sidebar?
Answer: With the Links/Blogroll system already built into WordPress along with a Sidebar Widget! Here’s How:
I’ve seen this question asked many times. Most WordPress users assume that the blogroll/link widget using the integrated links system in WordPress will only display text links so many people use text widgets to paste HTML code for simple image links to other websites. Here is an alternative to the text widget method.
- You will need to have a url that points to the image that will be displayed in your sidebar for the image link. Most bloggers prefer that you host these images yourself. You can use the image hosting of your choice so long as the image is accessible via a regular URL. You will just need to know the full URL to the location of the image file.
- Next you will add the link to WordPress. From the WordPress 2.5 dashboard you can go to the “Write” tab and then choose the “Link” sub-tab.
- Complete the basic link information
- Name - This is the text that will display if an image is not present for the link
- Web Address – This is the URL that will be loaded when your link image is clicked.
- Description – This is designed to give more information about the link. It is not as widely used as the Name but if you plan to create a good links page at any point I suggest including this information.
- Category – This is important if you want your sidebar widget list to separate different types of links into categories
- Advanced Options
- Target - This is where you set whether you would like the link to open in a new window or the same window.
- Link Relationship – This is an area that I have not explored but I plan to write a future post about the information set here can be used.
- Advanced – This is where you set up the image information!
- Image Address – Enter the full address to the image, which you should have from Step 1
- RSS Address – Link some of the other option this is not used as widely but entering this gives you future access to this info
- Notes – You can add notes to yourself here. Want to be able to remember why this link was worth adding, enter the reason here.
- Rating – Another option that can be used in certain situations, does not display in the standard links widget
- Go to the Design Tab then to the Widgets sub-tab to add the Widget to your sidebar. Click the “Add” Link on the Links Widget on the left side of the screen, Drag the widget to the spot you would like the widget to be on your site and click save.
This is the most basic application of this solution. The Link widget included with WordPress does not allow any modification in terms of which link categories display, which pieces of information to display, or to change the sort order of the links.
Some more flexible Link Widget options: