WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is the kind of archive page I am trying to reproduce for my client:


As you can see, it is a list of alphabetically organized lists. How would I go about creating this in Wordpress?

share|improve this question
up vote 1 down vote accepted

I'd use the default Links section in the dashboard, then write a custom loop to sort them alphabetically (and with the rad big letters of the alphabet as headings).

Throw this in your theme's functions.php file, then use it on any page with the [bookmarks] shortcode:

function bookmarks_by_alphabet( ) {

    $letter = ''; // For tracking which letter of the alphabet we're at.
    $args = array(
        'category_name'  => '', // Category name of a category of bookmarks/links to retrieve. Leave this blank to get them all.
        'limit' => -1 // Show all. 
    $output = '';   
    $links = get_bookmarks( $args );
    if ( $links ) {
        foreach ( $links as $link ){

            if ( $link->link_name[0] != $letter ){
                $letter = $link->link_name[0];
                $output .= '<h2>'.$link->link_name[0].'</h2>';
            $output .= '<a href="'.$link->link_url.'">'.$link->link_name.'</a>'.'<br />';
            //echo '<pre>'.print_r($link, true).'</pre>';

    return $output;
add_shortcode('bookmarks', 'bookmarks_by_alphabet');
share|improve this answer
thanks Dominic. I am going to try this out – Amit Erandole Jun 19 '12 at 14:10
You can use it in a custom template like so: echo do_shortcode('[bookmarks]'); – Dominic Jun 20 '12 at 4:29
Thanks a lot for helping out, Dominic – Amit Erandole Jun 21 '12 at 6:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.