How to Add a Tumblr Section to Wordpress Blog
I recently decided to add a tumblelog to my website, and found it not to be a trivial thing to incorporate into a Wordpress site. For those who may be interested, here are some brief instructions on how I set it up on this website.
What I wanted to accomplish
I wanted to have two tabs on my website, one that has the main blog, and the other which would show my Tumblr posts. I also wanted to have two separate feeds.
Step 1: Set up your Tumblr account
Go on over to Tumblr and set up an account. Put up a couple posts for good measure so that later on you’ll be able to see if things are working right. I’m using the bookmarklet they supply in the “goodies” section to post to a Tumblr account.
Step 2: Install WP-o-Matic
WP-o-Matic pulls in an RSS feed and converts them to WP blog posts. This will be used to pull in the Tumblr posts and put them into the WP blog. Install the plugin to the Wordpress site, and start a campaign in which the Tumblr RSS feed are converted into posts. Make sure to have a unique category applied to all Tumblr posts (I used “tumblr”).
At this point, the Tumblr posts and normal blog posts are mixed together, all on the main blog post page. What we want is for them to be separate. To do this, the category aspect of posts becomes important. What we end up doing is creating a category listing page that displays all the Tumblr posts, and we exclude all the Tumblr posts from the main blog Page.
Step 3: Put in the Tumblr Category Tab
As explained by Moshu, the best way to display a certain category on one page is to put in a link for the category in the header by hand. This involved editing the theme for the WP blog. Opening the header.php, find the snippet of code that looks like:
and add
Step 4: Exclude the Tumblr posts from your normal blog
Now, we don’t want our Tumblr posts showing up in the normal blog, so we need to exclude all posts with the category “tumblr”. Open up the index.php file, and paste
? get_query_var('paged') : 1;
query_posts("cat=-##&showposts=10&paged=$page");
?>
right above the section of code that starts with (again, the ## is the category id number). Thanks to Moshu and Mauropr for this solution, found on a thread of the Wordpress.org forums.
Step 5: Set up the separate RSS feeds
For the normal blog feed, all that needs to be done is to exclude all Tumblr-categorized posts. To do this, just add a "&cat=-##" to the end of your wordpress feed. As an example, my main blog feed became http://www.abeolson.com/?feed=rss2&cat=-19.
Side note: I use Feedburner to publish all my feeds, so all I had to change the source feed to Feedburner. This saved my blog readers from having to change their feed source to reflect my changes. One more reason to use Feedburner.
For the Tumblr blog, the RSS feed that Tumblr provides can be used.
Using those links, you can promote your blog feeds wherever you’d like.
Step 6: Make sure everything works right
Subscribe to the feeds that were created, check out the site, try posting more things to the Tumblr account, create normal blog posts, and generally see if everything looks like it should. If there are any problems, it may mean looking in at some of the code in the php files and adjusting things. The header and footer may need to change too to reflect the new feeds, if there are links to them there.
Now you’re done. Start tumblelogging!
February 7th, 2008 at 11:20 pm
I am glad that my little tutorials were of help for you. References (links) like yours in the post above always make me to think about posting more guides and tips for WP users.
Good luck with your blog!
February 14th, 2008 at 11:22 pm
[...] How to Add a Tumblr Section to Wordpress Blog Another method to incorporate your tumblr blog with Wordpress (tags: WordPress tumblr RSS) [...]
February 16th, 2008 at 1:31 pm
[...] How to Add a Tumblr Section to Wordpress Blog [...]
March 27th, 2008 at 1:38 pm
[...] Olson | Blog Archive | How to Add a Tumblr Section to Wordpress Blog Category: Tumblr | Abe Olson | Blog Archive | How to Add a Tumblr Section to Wordpress Blog: Dundundun… Might be an idea… by Utena | About the author: Pin Up Girl For Frontal Assault. [...]
April 26th, 2008 at 12:08 pm
[...] Abe Olson | How to Add a Tumblr Section to Wordpress Blog [...]