query_posts returns blank
-
Hi
I have a problem with query_posts returning an empty string when trying to return a specific page.
In my sidebar I have this;
<div id=menu>
<ul><?php query_posts('pageid=6'); ?></ul>
<ul><a href="<?php query_posts('pagename=services'); ?>">Services</a></ul>(you can see I’ve tried it embedded within an A tag and without).
In my html code I just get this;
<div id=menu>
<ul></ul>
<ul><a href="">Services</a></ul>This applies to any query_posts query that I try to run in my sidebar.php. However, other queries, like a wp_list_pages query that I also run in my sidebar, run fine and return valid data.
I’ve checked that pageid 6 exists and that there is a page with a slug of ‘services’.
Can anyone think of why this might be ?
Olly
The topic ‘query_posts returns blank’ is closed to new replies.