Custom RSS

October 26, 2010

WordPress is a great platform for people who are just starting out with RSS. Automatically-generated feeds take the guesswork out of picking and choosing content, as well as coding clean XML. However, many websites have need of much more detailed feeds than what WordPress provides. For example, central banks worldwide have adopted an RSS standard known as RSS-CB, used for displaying a variety of specific information like exchange rates, speeches and news. A lot of additional fields are required to meet the RSS-CB specifications.

Enter custom RSS templates. By coding an RSS template from scratch, it’s entirely up to the developer which fields to use and what information to populate them with. Custom templates also allow a website to have different types of feeds for the same content, e.g. both RSS 2.0 and RSS-CB for press releases. The More Fields plug-in is an asset here, as custom metadata can be pulled in either to populate additional fields like RSS-CB’s <cb:venue>, or to simply include in the <description> section of an RSS 2.0 feed.

The starting point for creating these feeds was a very brief tutorial we found in a Google search: Custom RSS feeds in WordPress. Skipping the FeedBurner part, we created a general RSS page template, stuck it on a page and voila! RSS displayed exactly the way we wanted it. It would have been cumbersome to create individual pages for all the different types of content on the website, so a redirect rule was added to the .htaccess file to reroute all /feed/ URLs to one central RSS hub:

RewriteRule (.*)feed/(rss2|rss-cb){0,1}/{0,1}$ bc-rss/?f=$1&t=$2 [R=301,L]

This rule handles feeds for authors, tags and most importantly categories, taking the information type, slug and RSS type (rss2 or rss-cb are specified here) from the URL and flipping them around into usable GET parameters. Using these parameters, a WordPress post query can be built fairly simply to return all the necessary data to populate any given RSS schema, all in one template. That can get a little crowded though.

Enter the Carrington theme. Carrington automates the selection of customized templates based on categories. Using Carrington isn’t necessary to get custom RSS running smoothly – you can always have multiple WordPress pages for multiple RSS templates – but if you are looking for a new theme or already using Carrington, take advantage of it.

By creating a custom loop for each type of RSS, we were able to use Carrington’s built-in functionality to select a highly customized RSS template based on both RSS type and category. Now we can display all of our regular content in appropriate RSS 2.0 feeds, as well as central bank crawler content in valid RSS-CB feeds. Adding new feeds is easy as creating a new template file.


AJAX Scroll

April 15, 2010

AJAX Scroll is a WordPress plugin that links an AJAX-enabled page scroller to the standard next and previous post links.

Clicking on a “next” or “previous” link will cause the current page to fade and slide out; the following page will slide and fade in.

Learn more about AJAX Scroll


March 4, 2010

PBox is a handy tool to create stylized widgets with custom content. Create custom widgets to display content from pages, posts, and external URLs; you can also display customizable links, text, and images. Easily stylize your presentation box widget with your own custom HTML and CSS. Incorporate your styles as part of your theme for multi-themed projects or make it part of the plugin for modularity.

With PBox, you can standardize the display of custom content in the sidebar with your own themes.

Bring attention to important notices or information with the provided example “Alert” style!

  • For pages/posts/files, display a link with (optionally) the content or excerpt.
  • Display (optionally filtered) external content from another page or site with the External URI type.
  • Display thumbnails of your media library images, with the option to display in full size with Fancybox!

PBox even works with XWidgets!

Learn more about PBox

XWidgets Plugin

March 4, 2010

Imagine the ability to choose custom widget layouts and settings for each individual page and post of your WordPress blog. What if we were no longer stuck with one set of widgets for the entire site — impossible, right?

Well, until now, yes. XWidgets provides an easy interface to customize your widgets on a page-by-page basis. Throw a Twitter feed in your homepage sidebar and have your ‘about’ page display Flickr or Last. FM widgets, while using a completely different widget layout than the rest of your site! What if you want each page of your site to pull in a different Google News feed via RSS or add a poll to the sidebar of a specific post, without changing any others? XWidgets lets you do just that.

Learn more about XWidgets