How to receive HTML messages from Wordpress blog remotely

I have my own word-press blog, and I'm making a static homepage for my jQuery-based website. So, I wanted to display some content from my blog, on my home page (in widgets), as a news section

For example, I can get

  • last 5 posts headers and content
  • OR the specific content of the page (via the transition page ID)
  • OR specific record (via the sending post id)

Thus, Wordpress includes any PHP file that displays message content in plain text or HTML.

I was thinking about getting an RSS blog and then show it on the page,
but RSS does not provide the full content of the post.

Thanks in advance

0
source share
2 answers

If it is hosted on the same server, you can include Wordpress in your application by including wp-blog-header.php , and then call get_posts () using setup_postdata() .

For instance:

  <ul> <?php global $post; $tmp_post = $post; $myposts = get_posts('numberposts=5&offset=1&category=1'); foreach($myposts as $post) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> <?php $post = $tmp_post; ?> </ul> 
+1
source

Take a look at Yahoo! Pipes .

0
source

All Articles