I am not a coder, and I am having trouble finding a script on how to show the recent blog posts from my blog, on a non-wordpress page. Does anyone know how to do this, or know of a script that does this? Any help would be much appreciated, Thanks.
Well, if you know a little PHP with MySQl, then it is simple to get latest post with a query like this: $sql = "SELECT post_title, post_date, post_excerpt FROM wp_posts ORDER by post_date DESC LIMIT 3"; Code (markup): then fetch the results with mysql_fetch_array() and echo to any page you want.
So, you have a wordpress blog and want to display your latest posts on a page that is not in the wordpress cms? Your blog should have an RSS feed of the latest posts available. If not, I am sure there is a plugin that will build one for you automagically. Then you have all of your recent posts in RSS format ready to be displayed anywhere. All you need is a good RSS to HTML converter. There are lots around, some are html based (generated from php, ruby, perl, etc) some are javascripts - depending on what you are wanting on the target site. If you are in to learning a bit of coding, CaRP is a great RSS to HTML script (one of my fav's), DynamicDrive also has a lot of freebies ready for you to copy'n'paste in to your site.
found something: <?php require(‘./wp-blog-header.php’); // alter to path to wp-blog-header.php script on your site ?> <!– if you want to have a title graphic it goes here –> <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?> # <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a> <small> in <?php the_category(’, ‘) ?> </small><small><?php the_time(’m-d-Y’); ?> <?php the_time(’g:i a’); ?></small><br /> <?php endforeach; else: ?> <!– put what you want here when there are no posts –> <?php endif; ?> PHP: Copy and paste that and easily add your recent posts to your non-Wordpress page
Also, there are alot of nice script writen in JavaScript as well that will display the latest post and up to 50 char of the post on any page you place the script in. Just go to google and type in the following "JavaScript RSS Feed Reader" and there will be several to choose from.