WordPress API?
-
How easy is it to abandon WordPress templates completely?
I have a site into which I want to integrate WordPress, but it would need to live in and around amongst much other code. WordPress would power small pieces on certain pages, but it would never be the sole focal point of an entire page.
I’ve done a little work with this in a plugin:
$lastFivePosts = get_posts('');
foreach ($lastFivePosts as $post)
{
//Stuff here
}
But the whole plugin thing would get a little unwieldly. Is there an existing PHP API (not the plugin API) that would let you access WordPress posts and such from outside the system? Obviously, the code above works solely because its runs in the context of WordPress, with all the include files and such that it entails.
I know I could do raw SQL — and I will without other options — but I was hoping someone else had done something similar.
Deane
- The topic ‘WordPress API?’ is closed to new replies.