Hello All, just looking for recommendations on which is the best way to parse the recent posts of a wordpress blog onto another non blog website?
Hello All, just looking for recommendations on which is the best way to parse the recent posts of a wordpress blog onto another non blog website?
Simplest solution would be to use RSS.
There's plenty of ways of doing it. If you're lazy you could use feedburner, like I'm doing on Michele J. Neylon :: Web ramblings and more..
OR you could use one of the many RSS libraries like Carp etc., etc.
Up to you really
Of course if you were using MovableType you could simply use a widget![]()
this question was asked here as well (well how to setup an rss feed)
http://www.irishwebmasterforum.com/c...rss-feeds.html
I did my best to answer ... solution given was using magpie
IT Books.ie | Computer Books
Recent Work | The Dropped.IE Domain List | Devine Building | Children's Festivals in Ireland | Galway Hot Yoga | Freelance Jobs African Safari Holiday
Blog | James Larkin Work | Web Design Dublin, Ireland - Web Development Dublin, Ireland
Thanks for suggestions, i tried this one
Cut n' Paste JavaScript RSS Feed
I like it as there is no branding.
if you own the blog you can just setup a db connection and pull the latest #? post from it.
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Car Parts & Accessories Car Parts
:. Cars Ireland Cars Ireland
:. I Have 2 Find It Directory SEF Directory
Yes i own the blog. Would that involve much work?
if you just want to pull the posts ... and so on ...
about 15 minutes to half an hour
to actually write the bit of code probably a minute ... to format it nicely and so on ... probably the rest of the time ...
IT Books.ie | Computer Books
Recent Work | The Dropped.IE Domain List | Devine Building | Children's Festivals in Ireland | Galway Hot Yoga | Freelance Jobs African Safari Holiday
Blog | James Larkin Work | Web Design Dublin, Ireland - Web Development Dublin, Ireland
there is something I use myself
PHP Code:$show_blog = true;
if($show_blog){
//replace HOST, USER, PASS, DB_NAME with your DB details
$limit = 10;
$con = mysql_connect(HOST,USER,PASS);
if (!$con){ die('Could not connect: '); }
// make foo the current db
$db_selected = mysql_select_db('DB_NAME', $con);
if (!$db_selected) {
die ('Can\'t use db : ');
}
echo "<div class='left_tab'>Recent Posts...</div>
<div class='left_menu'>
<ul>";
$sSql = "SELECT `ID`,`post_title`, `wp_posts`.`guid` FROM `wp_posts` WHERE `wp_posts`.`post_status` = 'publish'
AND `wp_posts`.`post_type` = 'post' ORDER BY `wp_posts`.`post_date` DESC LIMIT 0, $limit";
$rs_blog = mysql_query($sSql,$con) or die("no connection");
while($row_blog = mysql_fetch_array($rs_blog)){
echo "<li><a href='".$row_blog['guid']."' title='".
htmlspecialchars(str_replace("'"," ",$row_blog['post_title']))."' target='_blank'>• ".htmlspecialchars($row_blog['post_title'])."</a></li>";
}
mysql_free_result($rs_blog);
echo "</ul>
</div>";
mysql_close($con);
}
Last edited by louie; 10-01-2008 at 11:53 PM.
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Car Parts & Accessories Car Parts
:. Cars Ireland Cars Ireland
:. I Have 2 Find It Directory SEF Directory
IT Books.ie | Computer Books
Recent Work | The Dropped.IE Domain List | Devine Building | Children's Festivals in Ireland | Galway Hot Yoga | Freelance Jobs African Safari Holiday
Blog | James Larkin Work | Web Design Dublin, Ireland - Web Development Dublin, Ireland