wordpress 以外の php ページに wordpress ブログの投稿を表示する必要があります。次のコードを試しました。
<?php
// Include WordPress
define('WP_USE_THEMES', false);
//exact path for wp-load.php.
// This file is kept in the root of wordpress install
require('http://test.com/wordpress/blog/wp-load.php');
//Query wordpress for latest 4 posts
query_posts('showposts=5');
?>
<?php while (have_posts ()): the_post(); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php endwhile; ?>
しかし、それは私に次のエラーを示しました
Fatal error: Call to undefined function query_posts()
これを修正する方法は?