How I Moved My WordPress Blogroll From My Sidebar to a Page

March 23, 2010
By

If you link to lots of other astrology blogs, that long list in your sidebar could make your pages much longer than you want them to be. In addition, I’ve heard tell that a link loses its power when it is duplicated on every single page of your site. If you’re somewhat technically proficient with WordPress, there is an easy way to remove the blogroll from your sidebar and feature it only on one page. (These instructions are heavily lifted from Atma Explorer. I’ve added nothing really new, but I’m so excited that I was able to do this that I wanted to share it with you.)

First, go into your WP Dashboard > Appearance > Editor. Find the page.php file and copy its contents. Paste the contents into a text editor, and replace

<?php the_content(…); ?>

with

<?php wp_list_bookmarks(”); ?>

Then, at the very top of the file, add the following:

<?php
/*
Template Name: Links
*/
?>

If you want to change the default output of the wp_list_bookmarks(”) function, you can refer to the codex. Because I have more than one category of bookmarks, I decided to list my astrology blogroll on a page, and leave links to blog directories in the sidebar widget. I changed mine to wp_list_bookmarks(‘categorize=0&category=84&title_li=0′). Here, I’m basically saying I don’t want the category title to show, and I only want to display the links in category 84 – my astrology blogroll. (To find out the category number, go to Link Categories in the dashboard. Click on the edit link for the category you want to feature, and you will see the number at the very end of the URL.)

Finally, save the file as “links.php”

The next step: upload links.php via FTP to …/wp-content/themes/[name of theme you are using]/. Once it is uploaded, you will be able to edit it within the dashboard.

The last step: Go to the dashboard and create a New Page. Give it a title. (I called mine Friends.) Leave the body of the page blank. To the far right, look for the “Attributes” box. Under “Template,” you will see a drop-down list. Choose “Links.” Then hit Publish.

That’s it! Now, any time you add a link to your blogroll (at least for the category you’ve specified) it will automatically update to your new links page.

About the Author
Jeffrey Kishner is publisher of Sasstrology. He offers blog customization services.

Comments are closed.

Get All The Latest Posts!

Astrology Media Press RSS logo 

Our Blogs

Follow Us on Facebook

UA-10296882-1