Is there a way to insert only the wordpress posts on my website? ?
I installed wordpress on my server, but I want to integrate the posts in my own design.
Perhaps a PHP script for this.
Yes, you can include this code in a PHP file on your site to include your WordPress blog posts in your own design:
<?php
$posts_to_display=1; //how many posts to display
require('blog/wp-config.php'); //the path to the wp-config file of the blog you want to use
$news=$wpdb->get_results("SELECT 'ID','post_title','post_content' FROM $wpdb->posts
WHERE 'post_type'=\"post\" AND 'post_status'=\"publish\" ORDER BY post_date DESC LIMIT $posts_to_display");
foreach($news as $np){
printf ("<div class='normalText'>%s</div>", $np->post_content);
}?>







Yes, you can include this code in a PHP file on your site to include your WordPress blog posts in your own design:
<?php
$posts_to_display=1; //how many posts to display
require('blog/wp-config.php'); //the path to the wp-config file of the blog you want to use
$news=$wpdb->get_results("SELECT 'ID','post_title','post_content' FROM $wpdb->posts
WHERE 'post_type'=\"post\" AND 'post_status'=\"publish\" ORDER BY post_date DESC LIMIT $posts_to_display");
foreach($news as $np){
printf ("<div class='normalText'>%s</div>", $np->post_content);
}?>
References :
http://www.expand2web.com/blog
http://www.wprecipies.com