Manas T

The Random Blog

How to display Links list on a page in WordPress?

with 4 comments

Requirements

  • A WordPress Blog
  • Lots of friend bloggers and favorite websites
  • Wish to share the above addresses with your readers

End Result

  • A extra large sidebar with no more space to keep other items

Do you have similar requirements? Then this post is just for you.

So what is the solution to the above problem. Simple, just move the links to a separate page so that the sidebar becomes free. Though you can create a page in WordPress and manually add links to it, by doing that you will not be able to use the the inbuilt Blogroll management functionalities in WordPress.

So the best solution will be to create a page which automatically grabs the links from WordPress Blogroll, something like my Links page. This will also enable you to use the Blogroll management feature from within the WordPress dashboard.

How to create a links page in WordPress

  1. First, you need to create a links page template. For that download the archives.php file of your template to your computer.
  2. Open it in Wordpad or any other text editor of your choice. It will look something like below.

    <?php
    /*
    Template Name: Archives
    */
    ?><?php get_header(); ?><div id=”content”><h1>Browse the Archives</h1>
    <div class=”post”>
    <p>By Date:</p>
    <ul>
    <?php wp_get_archives(‘type=monthly’); ?>
    </ul>
    <p>By Category:</p>
    <ul>
    <?php list_cats(); ?>
    </ul>
    </div>
    </div><?php include (TEMPLATEPATH . ‘/sidebarRight.php’); ?>
    <?php include (TEMPLATEPATH . ‘/sidebarleft.php’); ?>
    <?php get_footer(); ?>

  3. Now edit that file to look like below.

    <?php
    /*
    Template Name: Links
    */
    ?>
    <?php get_header(); ?><div id=”content”><h1>Links</h1>
    <div class=”post”>
    <ul>
    <?php wp_list_bookmarks(‘arguments’); ?>
    </ul>
    </div>
    </div>
    <?php include (TEMPLATEPATH . ‘/sidebarRight.php’); ?>
    <?php include (TEMPLATEPATH . ‘/sidebarleft.php’); ?>
    <?php get_footer(); ?>
    </ol>

    What I did was replaced everything that was inside the <div class=”post> and </div> tags with
    <ul>
    <?php wp_list_bookmarks(‘arguments’); ?>
    </ul>
    .
    Also I changed the the template name in the third line from Archives to Links and edited the page title inside the <h1> and </h1> tags from “Browse the Archives” to “Links”.

  4. Now save the edited file as links.php and upload the file to the location from where you downloaded the archives.php file.
  5. All set, now go to your WordPress Dashboard —> Write —> Write Page. Fill in the “Page Title” as “Links” and then select the “Page Template” on the right hand side as “Links”.
  6. Click “Publish”.
  7. Now visit your blog to see a all new “Links” page with all links pulled straight from your Blogroll.

Now you can make your sidebar free of that extra long blogroll and utilize it for something else. :)

In case of any difficulties, drop me a comment.. ;)

Written by Manas

March 21st, 2007 at 7:50 pm

Posted in Uncategorized

2 Trackbacks/Pingbacks

  1. WordPress Wednesday: New Security Release, Updated WordPressMU, More WordPress Plugins, and Time to Get Naked at The Blog Herald
  2. WordPress Wednesday: New Security Release, Updated WordPressMU, More WordPress Plugins, and Time to Get Naked » TechAddress

with 4 comments to “How to display Links list on a page in WordPress?”

Subscribe comments with RSS. TrackBack URL.

  1. iRonnie

    6 Aug 07 at 8:38 am

    hi! i have long been wanting to place my blogroll in a page and i am thankful for stumbling upon this entry. however, i cant seem to find the “Page Template” on the right hand side of my control panel. :(

  2. Yashni Marad

    14 Feb 09 at 4:56 am

    Thank you for your help!

  3. Lydia Owen

    1 May 10 at 3:44 pm

    WordPress is the best blogging platform ever. It is much better than Typepad and blogspot.`*`

  4. Theo Shaw

    14 May 10 at 3:36 pm

    i host 5 of my blogs on Blogspot and it is really good for beginners. but if you want something with more features, nothing beats wordpress’.,

Leave a Reply