Google Reader subscriptions on a WordPress Page
Instead of posting new lists of blogs I follow over and over again I thought I’d make a permanent place for them. So I just exported all of the blogs I follow from Google Reader (Settings -> Import/Export) and imported them to WordPress (Write -> Links -> Import Links (in the sidebar)). OPML is a great format!
Then I created a WordPress Page template that simply printed the content of that page followed by all my imported links. This following is the code needed (as a file called links.php in your template directory):
// Template Name: Links
?>
<?php get_header(); ?>
<div id="content">
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h1><?php the_title(); ?></h1>
<div class="entry">
<?php the_content(); ?>
<?php wp_list_bookmarks(); ?>
</div>
</div>
<?php endwhile; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Now just create a new page, and select the Page Template “Links” at the bottom. Fill out a page title and an introduction text and press Save. Voilá!
The final touches was adding two new categories, “Blogs I follow” in English and Swedish, moving all links to one of those, and removing everything not related to web development or media. Some bastards also both have great blogs and are my friends, so I removed some duplicates too.
So, here it is, a permanent page of my Google Reader subscriptions, converted into a WordPress page. I’m hoping you’ll find something interesting in the list of excellent blogs!
Duckie ( 9 Aug 2008 )
This PHP hurts my eyes…
Functions that echo stuff instead of returning a variable, kicking the parser on and off a dozen times, a while with a condition between ( ) and a : following ??
It hurts…
Emil Stenström ( 9 Aug 2008 )
@Duckie: Sure does, that’s how you write templates for WordPress. All function calls are built-in. Sorry :(
Exec ( 9 Aug 2008 )
A small problem
The B-List: Latest entries
Emil Stenström ( 9 Aug 2008 )
@Exec: Fixed, thanks.