Query Not Working
I went to http://codex.wordpress.org/Template_Tags/query_posts and I tried using this code in my template.
<?php // retrieve one post with an ID of 5 query_posts('p=5'); ?>
This code did not work. I changed the ID to the ID of the post I wanted to show, and it never showed on the front page. Then when I used the following code, I got a parse error.
<?php // retrieve one post with an ID of 5 query_posts('p=5'); global $more; // set $more to 0 in order to only get the first part of the post $more = 0; // the Loop while (have_posts()) : the_post(); // the content of the post the_content('Read the full post »'); endwhile; ?>
- The topic ‘Query Not Working’ is closed to new replies.