Wordpress Feed

apps

#1

Hi all, I’m pretty new to wordpress and PHP etc. so I’ll try and explain this as best I can.

What I want to do is use a feed from my wordpress blog to update on another part of my site. So that when I post something in a blog, the article will appear on this seperate page. The reason I want to do this, is because I want the blog posts to update on the home page of my site, but I need to be able to customize this page more than I can with the CSS for wordpress. So is there any way to do this?

I have tried to make my own template for wordpress, that wasn’t as easy as I thought. But is this a better way to go about it? Can you customize the template more than with just CSS?

Thanks a bunch. Not sure whether that made sense, I’ll do my best to clarify if it didn’t.


#2

There are several tools available to help you do stuff like this. The concept is that you utilize your WordPress RSS feeds to pull content into your site.

There are websites out there that let you build a javascript for displaying the contents of a feed (you insert the produced javascript into your webpage and the javascript displays the WordPress feed), and there are software packages that you can install on your own server space to facilitate similar types of displays (generally using iframes or server-side/php includes.)

Examples of the “online” tools for javascript or other programming languages can be found at :

http://feed2js.org/index.php
http://p3k.org/rss/?setup=true
http://itde.vccs.edu/rss2js/build.php
http://www.rss-to-javascript.com/
http://www.feeddigest.com/

If you want to “roll your own”, there are several such packages available (“free” and commercial), on hotscripts.com.

I happen to use, and like, magpierss, which works well here on Dreamhost and is very flexible. There is even a previous discussion of it’s use, and some sample code for implementing magpierss, in this forum. I have also installed and used feed2js (same as the first link above, but installilng the actually “generator” code on Dreamhost) here at Dreamhost, and it also works well if you would like to use javascript. Good Luck!

–rlparker


#3

Thanks a bunch, really helpful!:smiley:


#4

Just a question if anyone can help me;

I got the magpierss code working, however I can’t workout how to timestamp the entries. I’m not sure whether I’ve got the syntax wrong, or I just haven’t come accross the right code yet, or perhaps wordpress RSS isn’t timestamped (though it does seem to order chronologically).

So, if you could illuminate me as to how I can timestamp the entries that’d be great. Here’s the code I used just for reference.

----Sample Code----

<?php include('magpie/rss_fetch.inc'); error_reporting(E_ERROR); $rss = fetch_rss('http://www.dan.ddempsey.com/blog/?feed=rss2'); if ($rss) { $items = array_slice($rss->items, 0, 5); foreach ($items as $item ) { echo '

'.$item['title']. '' .$item['created']. ' '.$item['description'].'

'; } } ?>

----End Code----

Thanks:)


#5

The date will be in $item[‘pubDate’].

Just look at the RSS output itself, you’ll see that the elements contained therein correspond to the elements of your $item array.


If you want useful replies, ask smart questions.


#6

ooh, okay thanks, I’m new to all this RSS and PHP stuff.:wink: