236 PART IV • Additional Features and Functionality
INTEGRATING NON-WORDPRESS CONTENT
Sometimes you need to get non-WordPress content onto your WordPress site. This can be
tricky because not all publishing platforms play along nicely. At best, the content you need to
expose within your WordPress site can be exported in a widget-like fashion (not the plugin
kind, the JavaScript sort), included in whole with PHP, or perhaps even displayed in an iframe
if all else fails.
These days, an RSS feed can be a savior if you’re looking at text content especially, but also
when it comes to video and images. If the outside content is material from the image service
Flickr, for example, you can fetch the RSS feed either with a separate plugin (there are Flickr
plugins along with RSS variants) or with the built-in WordPress functionality for displaying
feeds. Chapter 13, “Extra Functionality,” features a few examples of how you can display
content fetched from RSS feeds. Another option would be to use a plugin such as FeedWord-
Press (http://wordpress.org/extend/plugins/feedwordpress), which queries
feeds repeatedly and creates posts in your database — which you can use any way you want,
just as you would if the content had been actually written directly in WordPress. There are
quite a few similar solutions out there, so if you need to fetch content from external sources
using RSS, you have a few plugins to choose from.
Either way, when you’ve figured out how to display the content you want within your Word-
Press site, chances are you’ll be creating a Page with its own template containing this code. I
suggest putting the code in the template files. This is the easiest way and the technique I
recommend before reverting to Exec-PHP or similar plugins that let you put PHP code within
posts and Pages, as they can really break things.
At other times, the solution may involve making a plugin that acts as a middle ground. I’ve
done this in the past, when I ran my own CMS and wanted to move to WordPress, but had
this huge database of games along with a lot of data. Text and images were easy enough to
import into the WordPress databases, but flexible taxonomies and native tagging support
didn’t exist back then, so I had to be creative with the games database. The solution was to
write a plugin that read that part and displayed it using shortcodes. It was a lot more hassle
than just displaying something from an RSS feed, but sometimes you just can’t get the content
into WordPress itself without extending it further.
Finally, if all else fails, just fake it. Make the page look like your WordPress theme but have it
outside of the actual theme. I know, that’s not as fun, but sometimes systems just clash, and
although you can usually sort it out, it may just not be worth the time.
DON'T FORGET TO INCLUDE A MANUAL
For people experienced with web-based systems, WordPress may seem like a breeze to use.
The problem is, not everyone sees it that way. In fact, people not used to web-based systems
may find WordPress daunting, despite being perfectly comfortable with word processors and
other common desktop software. There are user-oriented manuals built in to WordPress, but
will they be enough?