1.0
PictureBook
13. July 2009 · Author: Dale Crum
0 Comments

PictureBook

While doing our usual run of site updates and code adjustments, we ran into a small issue: how to display WordPress bookmarks with both text and images. Utilizing the ‘Links’ tab ( WordPress 2.7 + up ), it is possible to display them as either a list of text links or a list of image links but not both at the same time.

Several hours of research reading entries by angry WordPress users in the Support forum confident that bookmarks should only be allowed as text or images, it was clear this issue needed a resolution for the better. Why not have it both ways.

Enter PictureBook, a plugin that allows for the combination of both text and images when displaying a list of bookmarks. As with the case of this website, the footer contains a few social bookmarking links, each containing the name of the social bookmarking site and a small icon all through the wonderful world of WordPress’ “Links” tab. Achieving this goal is possible with a little core manipulation but we thought it would be more productive to simply install a plugin and not worry about the next WordPress update.

The plugin code itself is a simple matter of re-functioning the current wp_list_bookmarks. By altering the link_image output to display the link_name, it is possible to achieve the desired effect. The biggest benefit of this plugin is that a user is allowed to display their bookmarks in three separate formats: text-only, image-only and now a combination of both.

In the following example, we are using the standard WordPress wp_list_bookmarks formatting with a new function name wp_list_picturebook. All parameters associated with the original tag are functional. Below will display our list of bookmarks with both text and images, no headline and only list those bookmarks from category 4. Because WordPress auto adds our line item tags ( <li> ) it is not necessary to repeat this action.

Example

<div id="links">
<ul><?php wp_list_picturebook('title_li=&categorize=0&category=4'); ?></ul>
</div>

Installation

  1. Download the plugin and expand it.
  2. Copy the picturebook folder into your plugins folder ( wp-content/plugins ).
  3. Log-in to the WordPress administration panel and visit the Plugins page.
  4. Locate the PictureBook plugin and click on the activate link.
  5. Replace wp_list_bookmarks with wp_list_picturebook

Screenshot

doc4design.com - PictureBook - Screenshot

Leave A Comment

Please wrap any code within the <code> tag to display properly

I've been thinking a lot lately about stability versus spontaneity, freedom versus structure. Sometimes I find myself saying things like, "You can't grow unless you try new things,...

As I sit here at my desk with yet another article deadline staring me in the face, I can't help but wonder if I'm the only one who is plagued by the appealing face of procrastination....

In the advertising business we all aspire to do something big, something memorable, something great that has never been done before; unfortunately not very many of us get the opportunity...

I am under the personal belief that post titles should be short, sweet and precise enough to get the point across without sounding like an awkward newspaper headline. Sadly not all...

If you're involved in the world of design, whether it is by trade or business necessity, then you are probably familiar with the term "spec design", also known as "crowdsourcing". The...