DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Daily archives: Tuesday, September 27, 2011

Import Feed, Display in Multiple Columns

Posted by on

Recently I worked on a project where a single RSS feed was imported and displayed in multiple columns on the web page. Certain pages display feed items in two columns, others in groups of three or more. This technique uses WordPress’ built-in fetch_feed functionality to parse external feeds, and a slice of PHP magic to display them in multiple columns. It’s flexible too, enabling any number of columns and feed items from anywhere in your theme/template files. For example, you could display any of the following:

Code is poetry