themajiks
themajiks

Reputation: 414

Wordpress Latest Blog Entries Plugin for Website

I would like to display my blog entries on my website in an iframe or whatever suggested method is. Can somebody please advice how to do that?

Thanks in advance.

Upvotes: 0

Views: 529

Answers (1)

Shakeeb Ahmed
Shakeeb Ahmed

Reputation: 1808

Hi,

There are multiple options to do this I am mentioning three of them:

Menthod # 1

You can create a page template in wordpress and than using that page template create a page. Now you have the URL you can use that page in iFrame on any website.

Method # 2

Create a file at the root level of the server with this code:

<?php
// Include WordPress 
define('WP_USE_THEMES', false);
require('wp-load.php');
query_posts('showposts=1');
while (have_posts()): the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_excerpt(); ?>
<p><a href="<?php the_permalink(); ?>">Read more...</a></p>
<?php endwhile; ?>

Now you can call this file in the iFrame and you have the latest posts.

Method # 3

You can use the rss feed from wordpress and either use PHP or jQuery to style it.

Thanks

Peachlabs

Upvotes: 1

Related Questions