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
How do you extract image and content (& URL) from a WP Blog?
Moderator: General Moderators
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
How do you extract image and content (& URL) from a WP Blog?
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.
Re: How do you extract image and content (& URL) from a WP B
Using the blog's RSS feed or maybe XMLRPC would likely be simplest and most portable. Have you tried either of those?
-
simonmlewis
- DevNet Master
- Posts: 4435
- Joined: Wed Oct 08, 2008 3:39 pm
- Location: United Kingdom
- Contact:
Re: How do you extract image and content (& URL) from a WP B
Wouldn't have a clue how to do it with either.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
All the best from the United Kingdom.