Add content from blog to non-wordpress powered website
-
Hi Guys,
I have an issue with my wordpress blog. Last week I used some code on our non wordpress powered website which took the latest entry on our blog and pasted it into our homepage. The code below is what we used.
The blog is set up on a subdomain, and this is the code that was working.
<?PHP
//Include From The Blog
define('WP_USE_THEMES', false);
require('./blog/wp-load.php');
query_posts('showposts=1');
?><?PHP while (have_posts()) : the_post(); ?>
" class="blog-title"> <?PHP the_title(); ?><p> <?PHP the_excerpt(); ?> </p>
<?PHP endwhile; ?>This placed the latest blog entry into the index.php page of our homepage. I recently added a few plugins which required me to change permissions on the folders, and when I came back to this homepage the code above no longer worked.
It is now duplicating the index.php non wordpress homepage into the area I want to show the latest blog post.
Can anybody point me in the direction of what code I need to use to show just the latest blog entry from our blog and place it in a non wp page index.php?
Cheers
Dan
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘Add content from blog to non-wordpress powered website’ is closed to new replies.