Hello everyone
I am trying to display posts outside of my WP by using the following code:
<?php require('wp-blog-header.php'); ?>
<?php query_posts('showposts=3'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
blabla / loop
</div>
<?php endwhile; ?>
<?php endif; ?>
saved as newest.php in the WP folder, which resides under domain/blog/. The file works just as intented when I open it. But then I am trying to include that file into my CMS, which resides under domain/cms/
include("../blog/newest.php");
and I get the following error message:
Fatal error: Call to a member function set_prefix() on a non-object in /www/htdocs/w008c40e/blog/wp-settings.php on line 209
I have searched this forum, googled, but I can't come up with a solution to this problem. Could it be that the CMS (made simple) and WP just can't get along? Thank you very much for your help.