Skip to content

WordPress Get – a small script to get WP posts without using WP

I’ve just started writing a small project which is (at the moment) called WordPress Get. The idea is that it can be integrated into site designs to pull out the latest few WordPress blog posts, so you can display them in a small sidebar/box or whatever.

At the moment, this version is very embryonic and has a few features that are missing, namely email error log reporting and a nicer error message if it should go wrong. Also, at the moment all this script does is print the whole array of WP data that is fetched, you’ll need to adapt it to print just post titles, or extracts of the posts or whatever suits you.

I was going to need something like this anyway for my future site here (which will be a portal to all my stuff around the web) which will include a small box with the latest blog post or something (and a link to the main blog).

It was this post at TeenDev that motivated me to actually get started, and I’ve GPL’d this code so that you can adapt it for another FOSS project. If you want to use it in a closed design, I might consider LGPL-ing the code at some point, when it’s matured a bit more.

Thanks and enjoy.

Like this post?

If you would like to support the time and effort I have put into my tutorials and writing, please consider making a donation.

Post a Comment

On some sites, you must be logged in to post a comment. This is not the case on this site.
Your email address is not made public or shared. Required fields are marked with *.

Posting a comment signifies you accept the privacy policy.
Please note — your comment will not appear straight away, as all comments are held for approval.