Problem with calling query_posts()
-
Hey ,
I am running XAMPP latest version and WP 3.0.
Problem
When I try to use query_posts() for retrieving posts by slugs.
I am getting this errorWarning: trim() expects parameter 1 to be string, array given in C:\xampp\htdocs\wordpress\wp-includes\query.php on line 1272
for code
<backticks>
<?phpget_header();
query_posts(array(‘name’=>array(‘guitar’,’movie-post’)));if (have_posts()) :
while (have_posts()) :
the_post();
the_content();
endwhile;
endif;
get_sidebar();
get_footer();
?>
I</backticks>What is wrong with this ? If I cannot use this , can you please suggest alternatives? This works when I put query as ‘name=guitar’
The topic ‘Problem with calling query_posts()’ is closed to new replies.