Sillybean

Links

WordPress comes with a handful of links to resources on wordpress.org. These are all useful sites, and you should bookmark them for your own reference, but they’re probably not the sort of thing you want to promote to your visitors. Let’s delete them! In the main navigation bar, choose Edit under Links. At the top of the list, in the gray table header next to Name, you’ll see a checkbox. Select it and all the prepackaged links will also be selected. In the Bulk Actions dropdown, choose Delete and hit Apply. Now you’re ready to add some links of your own. Click the Add New button at the top of the page.

Basic Link Attributes

The Name you specify here (Figure 4-39) will be used as the linked text. Copy the link URL into the web address field. If you’d like to stop there, you can! All the other fields are optional.

Depending on how your theme handles links, the description might be shown as text or as a title attribute on the link tag, which will be shown when you hover over the link.

Links do not use the same group of categories that posts do. If you’ve just installed WordPress, you’ll have one link category, Blogroll. You can manage your link categories by choosing Categories in the Link section of the main navigation menu. If you don’t choose a category when adding a link, the default you specified in your Writing settings will be used.

Figure 4-39. Adding a link

Link Relationships: XFN™

XFN™ (XHTML Friends Network) is a microformat; that is, it’s a way of adding classes and IDs to basic tags in order to turn plain HTML into a richer source of data. XFN lets you indicate how you know the people whose sites you’re adding to your blogroll. XFN data is not visible to visitors. It’s used by search engines and social networking sites to determine your relationship to the people listed in your outbound links.

If you’ve defined your relationship with the owner of a link, WordPress will add the rel attribute to your <a> tag. For example, if you and your brother live in the same household and you’re linking to his site, you would choose co-resident in the geographical settings and sibling in the family group, and WordPress would generate the link like so:

<a href=”http://example.com” rel=”co-resident sibling”>…</a>

The various relationship options should be relatively self-explanatory, but you can read the full explanation of each at the WordPress Codex page at codex.wordpress.org/Defining_Relationships_with_XFN.

Do not fill in the rel text box. It will be filled in automatically as you check off the options in the XFN area, so you can preview your rel attribute before saving your link.

All XFN fields are optional. If you don’t care to specify how you know someone, simply leave this section blank.

Advanced Link Attributes

Figure 4-40. Advanced link attributes

The image address (Figure 4-40) is the URL of any image you want to represent your link. You could use something small, like a favicon that could be displayed next to the link text in a typical blogroll list. At the other extreme, you could choose a large image, and customize your theme so that the images are shown and the titles appear only as alt or title attributes. Using this technique, you could turn your link manager into an image gallery—and, by adding a little Javascript into the mix, you could even transform it into a featured content carousel.

Justin Tadlock has written an excellent tutorial on using link images to create a gallery. See justintadlock.com/archives/2009/01/09/creating-an-image-gallery-with-wordpress-bookmarks for more information.

Tip: To use images from your own site as link images, upload them in the Media Library, then copy the file URL to use in this field.

The RSS address field is intended to store the feed (which could be Atom or RDF, not just RSS) of the site you’re linking to. However, this field is seldom used in themes. The notes field is also not generally used in themes; you can use it to store private notes for yourself (and any other users of your site who might edit links).

While few themes take advantage of the rating field, it could be essential if you were building a link directory with the links manager.

Finally, you can make the entire link private if you wish. All the link information will be stored in your link manager, but none of it will appear when link lists are displayed on your site.

Link Feed

WordPress generates a feed of your links. The OPML format is commonly used to share lists of links (like bookmark files and blogrolls) on the web, so WordPress generates a basic OPML 1.0 feed, located at example.com/wp-links-opml.php.

comment

Sharing this post? The short URL is: http://sillybean.net/?p=5412

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>