Page 1 of 1

How do you extract image and content (& URL) from a WP Blog?

Posted: Fri Jun 10, 2016 4:51 am
by simonmlewis
We are trying to do something we have never attempted - to echo on the top level of a website, some content from it's Wordpress blog.

We want to show the last 3-4 blog posts, it's title, a portion of it's content, when it was published, any category, and the "featured image", along with a URL that goes directly to it's page.

I know the URLs are controlled by it's "permalinks". Can I extract the URL of a Post somehow??
How do I get the URL of the image, that's being used as the featured image?
Finally, the content of a blog is in HTML, so will have <p> tags. But if I take just a portion of it, I'm sure the <p> tag won't have an end, so maybe I need to manually add one at the end of my code anyway.

The title and dates are pretty simple I know. It's the other two parts I am having trouble with.

Thanks

Re: How do you extract image and content (& URL) from a WP B

Posted: Sat Jun 18, 2016 8:11 am
by Celauran
Using the blog's RSS feed or maybe XMLRPC would likely be simplest and most portable. Have you tried either of those?

Re: How do you extract image and content (& URL) from a WP B

Posted: Sat Jun 18, 2016 8:50 am
by simonmlewis
Wouldn't have a clue how to do it with either.