Skip to Archives

Using the Wordpress Link Manager to Display Your Portfolio

For web designers or other businesses alike, setting up a quality portfolio is essential. This tutorial will show you how you can use Wordpress's Link Manager to create and display your portfolio. This will allow you to use Wordpress to it's fullest extent, without the need of extra plugins or any hacked code.

Step 1. Supplying the Data

Lets start off by populating our Links manager with some data. In the screenshot below you can see the fields that I am using:

  • Name - Client Name
  • Web Address - To link back to. This can either be an internal posting explaining the project in detail or the actual client website (which is what I use).
  • Description - For title and alt attributes.
  • Categories - Skills that were used in creating the project.
  • Advanced: Image Address - Link to the screenshot of your project
  • Advanced: Notes - Description of the project

Optional fields include "Target" where you can force your links to open into a new browser window and "Keep this link private." This is how you can set up a portfolio entry but not have it shown in the display on the site. This could be helpful for when you have a project finished, but you can't show it until it's live.

When you are finished adding all your portfolio entries, you can go to Your WP Dashboard > Manage > Links to see the full list.

Step 2. Display Your Portfolio

Wordpress has two different ways to display it's "bookmarks" which we are now using as portfolio entries. They are wp_list_bookmarks and get_bookmarks

We will use the get_bookmarks template tag because it allows us to manipulate how our "bookmarks" look. The only caveat is that this template tag returns an array - which we will need to use some PHP code to parse though it. To see the data that get_bookmarks outputs, I quickly added this little snippet to my code:

<?php 
$arr_portfolio = get_bookmarks(); 
print_r ($arr_portfolio);
?>

The output from the print_r on get_bookmarks shows how the array is structured.

From that file, we can decipher enough to get the rest of the data echo'd out into an unordered list. The only thing that took a little tweaking was the fact that you have to find your own categories by running SQL on the wp_term_relationships and wp_terms tables in order to derive the category names by their id and the link's id.

<?php  
$arr_portfolio = get_bookmarks();  
//print_r ($arr_portfolio);
echo "<ul>";
foreach ($arr_portfolio as $site) {
	
   echo "<li>";
   echo "<h3>". $site->link_name ."</h3>";
   echo "<a href=\"". $site->link_url ."\" title=\"". $site->link_description ."\">";
   echo "<img src=\"". $site->link_image ."\" /></a>";
   echo "<p>". $site->link_notes ."</p>";
    
   $cats = $wpdb->get_results("SELECT * FROM wp_term_relationships, wp_terms WHERE wp_term_relationships.object_id = $site->link_id AND wp_terms.term_id = wp_term_relationships.term_taxonomy_id");
   echo "<p>Skills Used: ";
   foreach ($cats as $cat) {
   	echo $cat->name .", ";
   }
   
   echo "</p></li>";
}
echo "</ul>";
?>	

The great thing is that this code doesn't need to be placed within the_Loop. It will work great within it's own template or on the sidebar.

View the demo portfolio using this code.

Respond: Add your comment
Share this article: Save to Del.ico.us (2 Saves)
For regular updates: Subscribe to my RSS feed

Previous Articles

  • Generating an Automatic Popular Post List via Del.icio.us or Digg in Wordpress   Del.icio.us (1)
    Photo Credit: reportergimmi A few months ago I wrote an article on how to create a popular posts list, and in the example I used a category called 'Popular' to determine what was shown within the list. This approach is great for those that remember to periodically update their list by adding new posts to that ...
  • The Definitive Guide on Wordpress Syntax Highligher Plugins   14 Comments & Del.icio.us (5)
    These are reviews based on my own evaluations of the plugins. I downloaded, installed and tested each one within a default Kubrick theme installation on Wordpress 2.6. I tried to make this a complete list via the Extend Plugin Directory. I used a snippet of code from the recent post Creating a Simple Online Application using the ...
  • Creating a Simple Online Application using the Flickr API   Del.icio.us (2)
    Photo Credit: *dans The Flickr API is one of the most widely used APIs out there. In this article I will show you how to build your own simple online application using PHP and the Flickr API. The sample online application we build today will be one that takes a Flickr image URL (e.g. http://www.flickr.com/photos/dans180/854998249/), then outputs ...
  • CSS Tip: Easy Cross Browser & Valid CSS Text Shadows   4 Comments & Del.icio.us (1)
    Photo Credit: Glockenblume Although I am certain that I am not the only one doing this, I have developed an extremely easy way to get CSS text shadows without the need to use the wildly unsupported CSS property of text-shadow. .post_title { position:relative; padding:10px 0 0 0; } .post_title h1 { position:absolute; top:2px; left:2px; font-size:30px; color:#C9D8E9; padding:0; margin:0; } .post_title h6 { position:absolute; top:0; left:0; font-size:30px; color:#4471A2; padding:0; margin:0; } Lorem ipsum dolor sit amet consectetuer Lorem ipsum dolor sit ...
  • How to: Setting up Wordpress to Easily Function as a CMS   Del.icio.us (12)
    Photo Credit: tshein I have done many projects over the last year or so that use Wordpress as the back end but not for the typical blog setup. Most websites setup like this (an example is my setup here) will feature the same design and layout thought the whole site, but the homepage will be a ...
  • WP 2.5 Update: How to Use Wordpress as a Membership Directory   3 Comments & Del.icio.us (1)
    A couple months ago I wrote up a tutorial on how to use Wordpress as a Membership Directory. The problem was that the tutorial was using Wordpress 2.3 and a week later version 2.5 came out. After letting Wordpress, to advance to version 2.5.1, I decided to upgrade the PghDesigners.com website. To be honest, I was ...
  • Wordpress Tip: How to Create a Plugin to Help Automate a Complicated Theme   5 Comments & Del.icio.us (3)
    Most of my Wordpress design work has been for bloggers thus far. Designing a template for a blogger is usually straightforward and doesn't require much Wordpress hacking development work to get it what you want it to do. Most of that type of work is UI and design orientated. But what about if you are a ...
  • Wordpress Tip: 3 Awesome Custom Field Tricks   6 Comments & Del.icio.us (6)
    Here are 3 awesome ways to use Wordpress's custom fields. FYI: If you want an easy way to include default custom fields into your Write panel, try Rhymed Code's Custom Field GUI. If you have trouble with the download on his site, check out this comment for the fix. 1. A Custom Read More Bryan Veloso's new ...
  • How to Use Wordpress as a Membership Directory   35 Comments & Del.icio.us (11)
    UPDATE 5/26/08: I upgraded my membership directory to Wordpress version 2.5.1. There were little to no problems, so this tutorial is still completely valid for creating a membership directory with Wordpress. UPDATE: This is a repost of a guest post I made earlier this year over at WPDesigner. I am reposting it here because of the ...
  • Wordpress Tip: The Easy Way to Show a Popular Post List   8 Comments & Del.icio.us (1)
    Some may recognize the above screenshot as the 'Must Reads' section from the blog of one of the best Wordpress theme designers: Chris Pearson. In one of his most recent posts he explained how he uses categories. In this in-depth article, he mentions that categories are what powers the 'Must Reads' and 'Worth a Look' ...
  • Wordpress Tip: Essential UI Friendly Features   Del.icio.us (2)
    User Interface (UI) has been a hot topic recently. Mozilla is betting their money on it, Jakob undeniably knows it and even Wordpress itself emphasized it in their latest release. So when you are designing your next Wordpress theme,you will need to keep UI in mind. I have put together a list of some of the ...
  • Eliminating Blog Neglect by Altering Your Theme  
    Blog neglect is a joke. Nowhere did you ever proclaim that you were going to post once a day or a couple times a week, but the basic assumption out there among your readers is that if your blog doesn't have a frequent enough posting schedule, it might as well be DOA. What is considered a ...
  • CSS Tip: Easy Semantic Web Contact Information  
    The semantic web is coming in a hurry, so now is as good a time as any to embrace it and spend a few minutes to update your web site accordingly. On my site here, and for every member on my local community site, I use the same small snippet of HTML to make my ...
  • Wordpress Tip: A Custom Welcome Message for your Users  
    I recently published an article over at WPDesigner that gave detailed instructions on how to create a Wordpress backed membership community. A working community site will have it's members returning every so often to log in and update their information. A simple way to encourage this behavior is to display a custom welcome message (something ...

Pittsburgh Web Design - Cagintranet Web Design