Msg#: 3937859 posted 8:03 pm on Jun 21, 2009 (gmt 0)
I've got a wordpress blog in a directory on my server (/blog) and my main site on the root of the server. Is there anyway to grab the latest blog post and place it somewhere on the index page of my site preferably without using rss.
Msg#: 3937859 posted 9:23 pm on Jun 21, 2009 (gmt 0)
Sure - you'll need a PHP coder to do it though. The WordPress info is in a database that should be readily accessible if they're both on the same server. Alternately, you could simply use the PHP include() to pull in relevant portions of WordPress's core functions and execute the WordPress loop to gather the same information.
Msg#: 3937859 posted 2:41 pm on Jun 22, 2009 (gmt 0)
I'm not sure. I did Google searches for terms like: wordpress recent posts outside website static. I can't remember what I actually found under this but I'd suggest a trip to the WP forums and searches via Google (or your fav SE) using different combos of relevant keywords.
Msg#: 3937859 posted 6:11 pm on Jun 24, 2009 (gmt 0)
Thanks, It's been a couple days and I've looked high and low and can't find anything that would work. I found a lot of things on making a page static on wordpress, and wordpress loops, but can't find any examples that would pull the latest post onto a site. Everybody talks about doing it but I haven't seen any actual examples.
Msg#: 3937859 posted 5:07 pm on Jun 25, 2009 (gmt 0)
i haven't tried it out, but something like this should work. you just have to connect to the database and then look in the wp_posts table (it might have a different extension at the front, depending on how you installed it).
you can grab the post's title, text, excerpt or whatever you want from there.
$query = "SELECT * FROM wp_posts ORDER BY post_date LIMIT 1";$returns = mysql_query($query); $result = mysql_fetch_row($returns);