themovieaddict Posted August 4, 2006 Share Posted August 4, 2006 Hi,I've just installed WordPress on my server and essentially what I'd like to do on my website is use WordPress to post news updates. I was wondering how to display posts from a category on a .PHP page of my website.Example: let's say the index page of my website is "/index.php" and the main page is my site template with room for text in a large table below. How do I put my blog posts inside that table? Is there some type of include code I'd use to grab posts from the blog?Thanks in advance for any help. :) Link to comment https://forums.phpfreaks.com/topic/16573-how-to-display-blog-posts/ Share on other sites More sharing options...
hackerkts Posted August 5, 2006 Share Posted August 5, 2006 Wrong section, you should be posting them in 3rd party script.Hmm.. Read up the FAQ, there's example for getting datas from database.Below is just an example,[code]<?php$query = "SELECT * FROM wp_posts WHERE post_status ='publish' ORDER BY ID DESC";$result = mysql_query($query) or die("Query Error " . mysql_error());while ($row = mysql_fetch_assoc($result)){ echo $row['post_content'];}?>[/code] Link to comment https://forums.phpfreaks.com/topic/16573-how-to-display-blog-posts/#findComment-69751 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.